result of __builtin_constant_p not constant??

Doug Evans dje@transmeta.com
Fri Dec 20 16:02:00 GMT 2002


My reading of the docs of __builtin_constant_p suggest
the result of __builtin_constant_p is always 0 or 1.

So why does gcc complain here?
[target = i386-linux]

void
foo (void* a)
{
    unsigned b;
    extern int dummy[2 + __builtin_constant_p (b)];

    dummy[0] = 0;
    b = 3;
}

casey:~$ gcc-3.1.1 -O2 -S foo.c
foo.c: In function `foo':
foo.c:5: storage size of `dummy' isn't constant



More information about the Gcc-bugs mailing list