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.