http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54278
Bug #: 54278 Summary: "control reaches end of non-void function Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: tra...@gockelhut.com Created attachment 28027 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28027 compile with g++-4.7 -Wreturn-type to recreate struct ThingWithDtor { ~ThingWithDtor(); }; struct Aborter { __attribute__((noreturn)) ~Aborter(); }; int foo(int x) { ThingWithDtor t __attribute__((unused)); if (x) return x; Aborter(); } noreturn.cpp: In function ‘int foo(int)’: noreturn.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]