[Bug c/55009] compile-time assertions no longer usable: error: variably modified ‘ari_sign_32_bit_and_wrap’ at file scope

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Sun Oct 21 23:41:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55009

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-10-21 23:41:28 UTC ---
The C standard requirements that certain source code has certain semantics 
(such as, in this case, overflows making something not an integer constant 
expression and so an array a VLA) are unchanged by -fwrapv; that simply 
concerns what happens for certain code that under standard C would be 
undefined at runtime.

The diagnostic is correct and probably occurs as a result of fixes for 
various internal compiler errors relating to expressions with integer 
operands that are not integer constant expressions.  However, it might be 
possible to downgrade it to a pedwarn the way it is already downgraded for 
some other expressions folding to an integer constant.



More information about the Gcc-bugs mailing list