public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23658] New: bogus warning for missing return value
@ 2005-08-31 16:24 gdr at gcc dot gnu dot org
2005-08-31 16:44 ` [Bug middle-end/23658] [4.0 Regression] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-08-31 16:24 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug middle-end/23658] [4.0 Regression] bogus warning for missing return value
2005-08-31 16:24 [Bug c/23658] New: bogus warning for missing return value gdr at gcc dot gnu dot org
@ 2005-08-31 16:44 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-31 16:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-31 16:30 -------
Confirmed but we already decided (in the bug about libstdc++'s headers with -fno-exceptions) that
this is not going to be fixed for 4.0.x.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Status|UNCONFIRMED |RESOLVED
Component|c |middle-end
GCC host triplet|platform independent |
Keywords| |diagnostic
Resolution| |FIXED
Summary|bogus warning for missing |[4.0 Regression] bogus
|return value |warning for missing return
| |value
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23658
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-31 16:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 16:24 [Bug c/23658] New: bogus warning for missing return value gdr at gcc dot gnu dot org
2005-08-31 16:44 ` [Bug middle-end/23658] [4.0 Regression] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).