discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GSIMap and gcc 2.95


From: Fred Kiefer
Subject: Re: GSIMap and gcc 2.95
Date: Tue, 16 Aug 2011 22:59:14 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

On 16.08.2011 13:06, Riccardo Mottola wrote:
what goes wrong here?


Compiling file GSObjCRuntime.m ...
In file included from GSObjCRuntime.m:727:
../../Headers/GNUstepBase/GSIMap.h: In function `GSIMapFreeNode':
../../Headers/GNUstepBase/GSIMap.h:465: cast to union type from type not
present in union
../../Headers/GNUstepBase/GSIMap.h:468: cast to union type from type not
present in union
../../Headers/GNUstepBase/GSIMap.h: In function `GSIMapCleanMap':
../../Headers/GNUstepBase/GSIMap.h:1186: cast to union type from type
not present in union
../../Headers/GNUstepBase/GSIMap.h:1190: cast to union type from type
not present in union

I think this is caused by a compiler bug, that can be safely ignored.
The lines in question are similar to:
GSI_MAP_CLEAR_KEY(node);

And for the case GSI_MAP_KTYPES = GSUNION_PTR this is defined as:
#define GSI_MAP_CLEAR_KEY(node) GSI_MAP_WRITE_KEY(map, &node->key, (GSIMapKey)NULL)

And GSIMapKey is a union that contains in that case void* as a possible type. I don't understand why NULL isn't detected as belonging to that type, but you could try to add another type cast to the line above and see that gets reported. #define GSI_MAP_CLEAR_KEY(node) GSI_MAP_WRITE_KEY(map, &node->key, (GSIMapKey)(void *)NULL) Or rather use (char*)? I really don't see what goes on in the compiler to complain here.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]