https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19449
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-12-18 01:38:34 |2021-2-10
Known to fail| |11.0, 3.4.2
CC| |msebor at gcc dot gnu.org
--- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> ---
No change in GCC 11:
$ gcc -O -S -Wall pr19449.c
pr19449.c: In function ‘foo’:
pr19449.c:9:15: error: storage size of ‘e’ isn’t constant
9 | static char e[__builtin_constant_p (x) ? -1 : 1];
| ^
pr19449.c:10:15: error: object with variably modified type must have no linkage
10 | extern char f[__builtin_constant_p (x) ? -1 : 1];
| ^
pr19449.c:10:15: error: storage size of ‘f’ isn’t constant
pr19449.c:12:8: warning: unused variable ‘h’ [-Wunused-variable]
12 | char h[__builtin_constant_p (x) ? -1 : 1];
| ^
pr19449.c:11:13: warning: unused variable ‘g’ [-Wunused-variable]
11 | auto char g[__builtin_constant_p (x) ? -1 : 1];
| ^
pr19449.c:10:15: warning: unused variable ‘f’ [-Wunused-variable]
10 | extern char f[__builtin_constant_p (x) ? -1 : 1];
| ^
pr19449.c:9:15: warning: unused variable ‘e’ [-Wunused-variable]
9 | static char e[__builtin_constant_p (x) ? -1 : 1];
| ^
At top level:
pr19449.c:2:13: warning: ‘a’ defined but not used [-Wunused-variable]
2 | static char a[__builtin_constant_p (y) ? -1 : 1];
| ^