https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91215
Andrew Pinski changed:
What|Removed |Added
Resolution|INVALID |DUPLICATE
--- Comment #6 from Andrew
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91215
--- Comment #5 from Sebastien Boisvert ---
OK, thanks for the link, this is interesting.
A previous release, g++ 7.4.0, does not generate an infinite loop in the
executable. Like g++ 8.3.0, it does print the warning: no return statement in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91215
--- Comment #4 from Andrew Pinski ---
Also read https://gcc.gnu.org/gcc-8/porting_to.html :
-Wreturn-type is enabled by default
G++ now assumes that control never reaches the end of a non-void function (i.e.
without reaching a return statement).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91215
--- Comment #3 from Sebastien Boisvert ---
That was fast, thanks !
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91215
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91215
--- Comment #1 from Sebastien Boisvert ---
As indicated in the minimum reproducer, returning 0 fixed this bug.
g++ reports this warning:
g++-8.3.0-infinite-loop-bug.cpp: In function 'int doY()':
g++-8.3.0-infinite-loop-bug.cpp:20:1: warning: