[Bug c/23658] New: bogus warning for missing return value
gdr at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Aug 31 16:24:00 GMT 2005
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
More information about the Gcc-bugs
mailing list