This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/63517] New: bogus Wreturn-type warning after error
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Oct 2014 00:19:59 +0000
- Subject: [Bug c++/63517] New: bogus Wreturn-type warning after error
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63517
Bug ID: 63517
Summary: bogus Wreturn-type warning after error
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: manu at gcc dot gnu.org
struct X{};
int foo (int x, const X& y)
{
return x + y;
}
test.cc:4:12: error: no match for âoperator+â (operand types are âintâ and
âconst Xâ)
return x + y;
^
test.cc: In function âint foo(int, const X&)â:
test.cc:5:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
The Wreturn-type warning is bogus.
A similar issue in the C FE is PR60440.