https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943
Andrew Pinski changed:
What|Removed |Added
CC||contact@thunderperfectwitch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943
Stefan changed:
What|Removed |Added
CC||kdevel at vogtner dot de
--- Comment #8 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943
Jonathan Wakely changed:
What|Removed |Added
CC||dcb314 at hotmail dot com
--- Comment
--- Comment #3 from david at rothlis dot net 2010-04-30 06:05 ---
a function with a missing return is valid
I just can't reconcile that with the following line from the C++ standard: It
is now invalid to return (explicitly or implicitly) from a function which is
declared to return a
--- Comment #4 from redi at gcc dot gnu dot org 2010-04-30 11:22 ---
(In reply to comment #3)
a function with a missing return is valid
I just can't reconcile that with the following line from the C++ standard: It
is now invalid to return (explicitly or implicitly) from a function
--- Comment #5 from redi at gcc dot gnu dot org 2010-04-30 11:26 ---
The point being that it's undefined behaviour to /return/ from such a function,
not to /write/ such a function.
If the programmer guarantees the missing return will never happen then
there's no error.
I was wrong to
--- Comment #6 from david at rothlis dot net 2010-04-30 14:01 ---
OK, thanks for the explanation!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943
--- Comment #1 from pinskia at gcc dot gnu dot org 2010-04-29 20:31 ---
-Werror=Wreturn-type will turn just that warning into an error message in
recent GCC's.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943
--- Comment #2 from redi at gcc dot gnu dot org 2010-04-29 20:36 ---
that should be -Werror=return-type
but spelling aside, this is not a bug now
the compiler MUST NOT reject it by default, since a function with a missing
return is valid as long as the caller does not use the