https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116690
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=104690 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note in C++, it is undefined at the point of return in a rather than afterwards. Also note PR 104690 is filed about catching this with -fsanitize=undefined. Note also clang has a similar behavior as GCC on the different optimization levels and also does not catch it either with -fsanitize=undefined.