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.


_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to