[forwarded from http://bugs.debian.org/319309]
regression from 3.4, fixed in 4.1 Compile the attached example source code with: g++ -Wall -O3 -c bug.cc g++ produces the warning: bug.cc:9: warning: control may reach end of non-void function 'char* f(char*)' being inlined This is wrong, as should be obvious, since every possible control path in f() either leads to a return or a throw. g++ 3.x correctly analyses the code and does not generate a warning. -- Summary: [4.0 regression] wrong warning: control may reach end of non-void function Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: debian-gcc at lists dot debian dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22595