This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

result of __builtin_constant_p not constant??


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]