Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2022-02-18
17:01 • Closed ticket [22547f9053]: TIP 519 compiler warning plus 7 other changes artifact: 186f076996 user: jan.nijtmans
16:57
Fix [22547f9053]: TIP 519 compiler warning check-in: b719e05421 user: jan.nijtmans tags: core-8-branch
16:40 • Ticket [22547f9053] TIP 519 compiler warning status still Open with 3 other ... artifact: 5be90df77b user: dgp
16:40 • New ticket [22547f9053]. artifact: 2fc9a3c983 user: dgp

TIP 519 compiler warning

Closed / Fixed22547f9053402a46b3149637659f9ee16aa5613aCreated 5 years agoUpdated 5 years ago
Descriptionplain2022-02-18 16:40:09
/home/dgp/fossil/tcl8.7/generic/tclOODefineCmds.c: In function ‘TclOODefineMethodObjCmd’:
/home/dgp/fossil/tcl8.7/generic/tclOODefineCmds.c:2004:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  if (Tcl_GetIndexFromObj(interp, objv[2], exportModes, "export flag",
  ^
Referenced by1
dgp Ticket [22547f9053]: 3 changes [History diff]2022-02-18 16:40:23
jan.nijtmansplain2022-02-18 17:01:50
Fixed [b719e05421270833|here]. The type-cast originally used was illegal anyway (since there is no guarantee that sizeof(enum) == sizeof(int)). Starting with TIP #613, it is now legal to use an enum with Tcl_GetIndexFromObj(), but then the (illegal) type-cast doesn't help anymore to hide the real problem.

Thanks, Don, for noticing this!
Log in (anonymous is fine) to add a comment.