Bug 21800 - Bogus "control may reach end of non-void function ... being inlined" warning
Summary: Bogus "control may reach end of non-void function ... being inlined" warning
Status: RESOLVED DUPLICATE of bug 19699
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.0.0
: P2 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-28 17:43 UTC by Martin Mares
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
The test case (149 bytes, text/plain)
2005-05-28 17:43 UTC, Martin Mares
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mares 2005-05-28 17:43:04 UTC
`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.
Comment 1 Martin Mares 2005-05-28 17:43:55 UTC
Created attachment 8984 [details]
The test case
Comment 2 Andrew Pinski 2005-05-28 17:46:05 UTC

*** This bug has been marked as a duplicate of 19699 ***