[Bug c++/92297] The expression 0 / X is simplified to 0 even when the variable X is 0

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 31 14:52:00 GMT 2019


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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> Then if X = 0 we should expect an exception triggered at runtime, as we have for example for 1 / 0.

No undefined does not mean trap at runtime, it means anything can happen ...


More information about the Gcc-bugs mailing list