https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102502
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #2) > Why do you think it is a bug? Because there were other bugs which were fixed where there was an inconsistency, PR 66618, and PR 71983 for an example. There are others. Oh there is an inconsistency when the _Static_assert is not in a function vs inside a function. Take: static const int allocation_size = 32768; _Static_assert (allocation_size, ""); void f(void) { _Static_assert(allocation_size, ""); } The assert inside the function is accepted at -O1 but reject at -O0 while the one outside is always rejected.