Hum, well, only partially solved. I get a failure on c99-stdint-1.c, which I can reduce to:

$ cat u.c
#include <stdint.h>

void
test_ptr (void)
{
  __typeof__(INTPTR_MIN) a;
  __typeof__((intptr_t)0 + 0) *b = &a;
}

$ ./gcc/xgcc -B./gcc u.c -std=iso9899:1999 -pedantic-errors -S
u.c: In function ‘test_ptr’:
u.c:7: error: initialization from incompatible pointer type


This is because, for 32-bit for example, intptr_t is "long" and INTPTR_MIN is (-2147483647-1), which is of type "int". The same thing happens on 64-bit, because INTPTR_MIN is (-9223372036854775807LL-1), which is of type "long long", while intptr_t is still "long".

Is this a bug in darwin's headers?

FX

Reply via email to