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: Riccardo Mottola
Subject: Re: GSIMap and gcc 2.95
Date: Wed, 17 Aug 2011 00:13:03 +0200
User-agent: Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.1.16) Gecko/20110216 SeaMonkey/2.0.11

Hi,

with the current setup this causes an error and stops compilation, even if it looks harmless.

casting to (void *) seems to solve the problem, I changed both the _KYE and the _VAL macros.

I have tested this on GCC4 and x86 and commited it, thanks.

I'll resume sparc/gcc2.95 testing ASAP.

Riccardo
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]