gcc 4.1.2 and gcc 4.1.1 shows the following bogus warning message. [EMAIL PROTECTED] ~/tests] arm-rtems-gcc -Os -Wall -S test.cpp test.cpp: In member function 'int attr::create(int)': test.cpp:17: warning: control reaches end of non-void function
the minimal testcase: class attr { attr() {} ~attr() {} int create(int); }; int attr::create(int c) { attr p; switch(c) { default: return 123; break; } } -- Summary: [4.1.2, 4.1.1] bogus "control reaches end of non-void function" warning Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wad at infinet dot ru http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31783