https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102502

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Why do you think it is a bug?
This is not valid C11 code, and as an extension gcc when optimizations enabled
in some cases will accept in constant expressions even something that it
doesn't have to.
With -pedantic-errors it is properly rejected at all optimization levels.
It is also rejected at file scope.
If you want to make it valid in C11, use enum { allocation_size = (size_t)
32768 };
instead.
const doesn't work in C the same as in C++...

Reply via email to