The testcase below was distilled from GMP source code (thanks to TG). Consider
inline int foo (void){ if (1) return 0; } int bar () { return foo (); } compile with "-Wall -O2 -c". Gcc spits out tg.c: In function 'bar': tg.c:2: warning: control may reach end of non-void function 'foo' being inlined which clearly is bogus as the branch is *always* taken. -- Summary: bogus warning for missing return value Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gdr at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: platform independent http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23658