This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80458] [-Wreturn-type] false negative on missing return statement in a member function
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Apr 2017 22:36:32 +0000
- Subject: [Bug c++/80458] [-Wreturn-type] false negative on missing return statement in a member function
- Auto-submitted: auto-generated
- References: <bug-80458-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80458
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The two cases are not equivalent, because the member function is also inline.
If you add 'inline' to the second example you get no warning for that one too.
In both cases you get a warning for the inline function if it is used.