This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/21800] New: Bogus "control may reach end of non-void function ... being inlined" warning
- From: "mj at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2005 17:43:05 -0000
- Subject: [Bug c/21800] New: Bogus "control may reach end of non-void function ... being inlined" warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
`gcc-4.0 -Wall -O2' on the attached piece of code produces the following warning:
s.c: In function 'main':
s.c:15: warning: control may reach end of non-void function 'xtoi' being inlined
which doesn't make much sense as assert_failed() is known not to return. If I
remove the `if (1)', the warning disappears.
The warning doesn't appear in gcc 3.4.4.
--
Summary: Bogus "control may reach end of non-void function ...
being inlined" warning
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mj at ucw dot cz
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21800