Artifacts Associated With Ticket 36bcf04a704a22f3
Ticket change [ca1ea7e229] (rid 217080) by stu on 2023-08-09 11:18:23:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-plain"
- comment initialized to:
Edited to shorten paths: generic/tclInt.h:4358:12: warning: incompatible pointer types passing 'Tcl_Size *' (aka 'long *') to parameter of type 'int *' [-Wincompatible-pointer-types] return TclGetIntFromObj(interp, objPtr, sizePtr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ generic/tclInt.h:2757:46: note: expanded from macro 'TclGetIntFromObj' : Tcl_GetIntFromObj((interp), (objPtr), (intPtr))) ^~~~~~~~ generic/tclDecls.h:152:27: note: passing argument to parameter 'intPtr' here Tcl_Obj *objPtr, int *intPtr); - foundin initialized to: "Current"
- is_private initialized to: "0"
- login: "stu"
- priority initialized to: "5 Medium"
- private_contact initialized to: "702b65e835b7b4b4720d6e9d37fc582f82909394"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "stu"
- subsystem initialized to: "52. Portability Support"
- title initialized to:
Pointer size warnings when compiling on a 32-bit machine
- type initialized to: "Bug"
Add attachment "36bcf04a70.diff" [5d2a27ebe1] (rid 217096) by chrstphrchvz on 2023-08-10 11:44:58.
Ticket change [b6eeaaf827] (rid 217097) by chrstphrchvz on 2023-08-10 11:45:06:
- icomment:
The warning is about how C considers pointers to different integer types to be incompatible, regardless of whether the types have the same size. <tt>TCL_SIZE_MAX == INT_MAX</tt> does not necessarily mean <tt>Tcl_Size</tt> is <tt>int</tt>. Using a temporary <tt>int</tt> avoids the warning; see attached patch.
- login: "chrstphrchvz"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [adf4e95d20] (rid 217409) by chrstphrchvz on 2023-08-28 06:39:37:
- icomment:
The patch I attached was superseded by [2e65fce4cf]. But should Tcl be assuming that <tt>TCL_SIZE_MAX == INT_MAX</tt> implies <tt>sizeof(Tcl_Size) == sizeof(int)</tt>? Since the condition is no longer meant for the preprocessor, should Tcl just check <tt>sizeof(…)</tt> instead?
- login: "chrstphrchvz"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [8ad545547d] (rid 217412) by jan.nijtmans on 2023-08-28 08:06:13:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2460184.83765605"
- closer changed to: "jan.nijtmans"
- icomment:
> should Tcl just check sizeof(…) instead? It doesn't really matter (IMHO), but since TCL_SIZE_MAX is non-C-standard it would be - slightly - better. Closing. [e94242449556e1fd]
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"