[Bug c/79479] -Woverflow false alarm in unreachable expression

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 13 18:21:00 GMT 2017


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

Martin Sebor <msebor at gcc dot gnu.org> changed:

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

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
I think a similar issue was discussed in the past.  The warnings are justified
because implementations are allowed (even encouraged) to evaluate constant
expressions during translation rather than runtime.  As a result, the
translation of a program that contains an overflowing constant expression has
undefined behavior.


More information about the Gcc-bugs mailing list