When turning on optimizations (-O), the following code produces a wrong "control may reach end of non-void function" warning
inline float f(float x) { if ((x > 3.1415927) || (x<0)) return f(-x); else return 0; } float g(void) { return f(0); } -- Summary: wrong "control may reach end of non-void function" with -O Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pierre dot chatelier at club-internet dot fr CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23441