This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/55009] compile-time assertions no longer usable: error: variably modified âari_sign_32_bit_and_wrapâ at file scope
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 21 Oct 2012 23:41:28 +0000
- Subject: [Bug c/55009] compile-time assertions no longer usable: error: variably modified âari_sign_32_bit_and_wrapâ at file scope
- Auto-submitted: auto-generated
- References: <bug-55009-4@http.gcc.gnu.org/bugzilla/>
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.