[cfe-dev] size of pointer and size of long

Mike Stump mrs at apple.com
Tue Oct 21 13:44:51 PDT 2008


On Oct 21, 2008, at 1:36 PM, Eli Friedman wrote:
> For HandleModeAttr, I'm not really sure what gcc does; could someone
> check the output of the following on OSX 32-bit?
>
> typedef long a __attribute__((__mode__(__SI__)));
> int x[__builtin_types_compatible_p(a, long) ? 1 : -1];

mrs $ gcc -c -arch ppc t.c
t.c:2: error: size of array ‘x’ is negative
mrs $ gcc -c -arch i386 t.c
t.c:2: error: size of array ‘x’ is negative
mrs $ gcc -c -arch x86_64 t.c
t.c:2: error: size of array ‘x’ is negative
mrs $ gcc -c -arch ppc64 t.c
t.c:2: error: size of array ‘x’ is negative



More information about the cfe-dev mailing list