[Bug c++/94768] Wreturn-type should be error, not warning
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Apr 26 08:33:56 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94768
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to David Binderman from comment #3)
> I checked the source code of the popular Fedora Linux distribution.
> There are 32 examples of this problem in the C++ code, so they will
> need fixing.
>
> Interestingly, there are a whopping 258 examples in the C code, but that's a
> separate issue.
Note C and C++ have slightly different notice about "no return statement in
function returning non-void"; In C it is only undefined if the return value is
used while in C++ it is undefined the moment that the end of the function
happens.
More information about the Gcc-bugs
mailing list