Skip to content
Tcl Source Code History Of Ticket df85199878
Login

History Of Ticket df85199878

Artifacts Associated With Ticket df85199878

  1. Ticket change [1fe9af60ab] (rid 224330) by cjmcdonald on 2024-04-05 15:14:53:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized 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.
      
    5. foundin initialized to: "8.6.14"
    6. is_private initialized to: "0"
    7. login: "cjmcdonald"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "15d05e35c6efd35720375a1ce4b01373f7d13297"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "cjmcdonald"
    14. subsystem initialized to: "52. Portability Support"
    15. title initialized to: "Tcl_SetResult compiler warnings"
    16. type initialized to: "Bug"
  2. Ticket change [2b70d72f82] (rid 224341) by jan.nijtmans on 2024-04-05 21:21:57:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2460406.39024868"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Hm, this piece what meant to prevent another compiler warning, see [8ab8a138c9]. But if it produces another one with MSVC, it's counter-productive. Thanks for the report, indeed it's better to remove this.
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"