[Bug c/82296] Warn for code removal due to "code never accesses array out of bounds" assumption

kristerw at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 10 18:17:00 GMT 2017


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

Krister Walfridsson <kristerw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kristerw at gcc dot gnu.org

--- Comment #7 from Krister Walfridsson <kristerw at gcc dot gnu.org> ---
The C89 rules are the same as for C11 -- you can find the relevant text in C90
6.3.6 (it does not cover the "UB 62" from the ARR30-C page, but that is because
C89 does not have flexible array members...)

Using -std=c89 will compile following the rules in C89, so you will not suffer
from new undefined behaviors introduced in newer standards.


More information about the Gcc-bugs mailing list