https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96181
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- C++ says it is undefined at the point of fall through point. THIS is different from C where it is undefined if the value was used. AND yes this was done on purpose. If you want to catch it at runtime you could use -fsanitize=undefined.