Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 64ac383dd32a74eb5bbb00aa2148905226466dad0790a3928cb85479bcaca222
Ticket: 1e48483c8b3b2702b981ebcc85474512bb3d6e0d
Use of non-standard C code in TCLBOOLWARNING
User & Date: gustafn3 on 2024-04-25 17:31:54
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    The current version of Tcl9 uses the GNU statement expression extension inside 
    Tcl_GetBooleanFromObj(), actually in TCLBOOLWARNING
    
       tclsock.c:1321:22: warning: use of GNU statement expression extension from macro expansion [-Wgnu-statement-expression-from-macro-expansion]
                   result = Tcl_GetBooleanFromObj(interp, objPtr, &ok);
                            ^
       /usr/local/ns9/include/tclDecls.h:4056:3: note: expanded from macro 'Tcl_GetBooleanFromObj'
               (TCLBOOLWARNING(boolPtr)(sizeof(*(boolPtr)) >= sizeof(int) && (TCL_MAJOR_VERSION == 8)) ? Tcl_GetBooleanFromObj(interp, objPtr, (int *)(boolPtr)) : \
                ^
       /usr/local/ns9/include/tclDecls.h:4037:37: note: expanded from macro 'TCLBOOLWARNING'
       #   define TCLBOOLWARNING(boolPtr) ({__attribute__((unused)) char _bool_Var[sizeof(*(boolPtr)) > sizeof(int) ? -1 : 1];}),
          
    A "statement expressions" is an extension of the GNU C compiler and allows you
    to execute a group of statements, returning the value of the last statement. 
    This will cause problems on standard C compilers not supporting this extension
    
  5. foundin changed to: "9.0b3"
  6. is_private changed to: "0"
  7. login: "gustafn3"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "ef1993a98c1daa778fe0b246a7af12b3076f2240"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "gustafn3"
  14. subsystem changed to: "10. Objects"
  15. title changed to: "Use of non-standard C code in TCLBOOLWARNING"
  16. type changed to: "Bug"