Overview
| Artifact ID: | 1fe9af60ab1f0c03d8d5a383de4786954a298f38f1670d1909f1fcbc61811e29 |
|---|---|
| Ticket: | df85199878265b0e5aa4412a569758b5affb66a9
Tcl_SetResult compiler warnings |
| User & Date: | cjmcdonald on 2024-04-05 15:14:53 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
Calls to Tcl_SetResult from Tcl extension packages which previously compiled cleanly in Tcl 8.6.13 are now producing warnings with Tcl 8.6.14. The extensions are compiled on Windows 10 with Visual Studio 2022, with the /W4 compiler option. The Microsoft docs says /W4 outputs: <i>all level 4 (informational) warnings that aren't off by default. We recommend that you use this option to provide lint-like warnings.</i> The extensions are using stubs. Compiler options include: /W4 -DUSE_TCL_STUBS -DUSE_TK_STUBS -DTCL_THREADS=1 With Tcl 8.6.14 any C statement such as: <pre> Tcl_SetResult( interp, "this is an error message", TCL_STATIC ); </pre> now produces a warning: <pre> warning C4152: nonstandard extension, function/data pointer conversion in expression </pre> The cause appears to be additional macro trickery introduced into tclDecls.h in Tcl 8.6.14: <pre> #if defined(USE_TCL_STUBS) ....... #ifndef __cplusplus .......... # undef Tcl_SetResult # define Tcl_SetResult \ ((void (*)(Tcl_Interp *, char *, void *))(void *)(tclStubsPtr->tcl_SetResult)) /* 232 */ #endif #endif </pre> The warning is from the third argument of the Tcl_SetResult macro declaration, which is now void * instead of Tcl_FreeProc *freeProc. - foundin changed to: "8.6.14"
- is_private changed to: "0"
- login: "cjmcdonald"
- priority changed to: "5 Medium"
- private_contact changed to: "15d05e35c6efd35720375a1ce4b01373f7d13297"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "cjmcdonald"
- subsystem changed to: "52. Portability Support"
- title changed to: "Tcl_SetResult compiler warnings"
- type changed to: "Bug"