https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104635
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
There's nothing wrong here - by omitting the return you tell GCC that the loop
exit cannot be possibly reached which means we elide it and the exit test.
You do get a diagnostic by default for this which cannot be an error since the
behavior is only undefined at runtime.