|
From: <no...@so...> - 2002-01-28 00:07:33
|
Patches item #509340, was opened at 2002-01-27 15:45 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=310894&aid=509340&group_id=10894 Category: 50. Other Tools Group: None Status: Open Resolution: None Priority: 5 Submitted By: David Gravereaux (davygrvy) Assigned to: Jeffrey Hobbs (hobbs) Summary: ClientData set to int* not void* Initial Comment: With the MS compiler, the following is allowed without casting even with langauge extensions turned off (-Za). /*#include "tcl.h"*/ #ifdef __STDC__ # if defined(__STDC_VERSION__) && __STDC_VERSION__ == 199409L # pragma message ("*** ISO C and AM1 complient") # else # pragma message ("*** ISO C, but not AM1 complient") # endif #else # pragma message ("*** Not ISO C complient") #endif void main (void) { /*ClientData someTypeLessPointer;*/ void *someTypeLessPointer; struct { __int64 a; char b; } someStruct; someTypeLessPointer = &someStruct; } Placing a typed pointer into a typeless pointer is allowed. The typedef for ClientData should be void*, not int* under this compiler, IMO. Notice the test for __STDC__ is a failure under this compiler, too. __STDC__ is only defined when the -Za switch is used. I'm at a loss to understand what the complience of the compiler really is, but getting back to the patch, a void* is legal, so let's use it. ---------------------------------------------------------------------- >Comment By: David Gravereaux (davygrvy) Date: 2002-01-27 16:07 Message: Logged In: YES user_id=7549 In this case, I guess "not ISO C" means greater than instead of "sub ISO C" ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=310894&aid=509340&group_id=10894 |