This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
result of __builtin_constant_p not constant??
- From: Doug Evans <dje at transmeta dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 20 Dec 2002 15:59:53 -0800
- Subject: 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