public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23441] New: wrong "control may reach end of non-void function" with -O
@ 2005-08-17 13:46 pierre dot chatelier at club-internet dot fr
2005-08-17 15:16 ` [Bug c++/23441] [4.0 Regression] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: pierre dot chatelier at club-internet dot fr @ 2005-08-17 13:46 UTC (permalink / raw)
To: gcc-bugs
When turning on optimizations (-O), the following code produces a wrong "control may reach end of
non-void function" warning
inline float f(float x)
{
if ((x > 3.1415927) || (x<0))
return f(-x);
else
return 0;
}
float g(void)
{
return f(0);
}
--
Summary: wrong "control may reach end of non-void function" with
-O
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pierre dot chatelier at club-internet dot fr
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23441
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-17 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-17 13:46 [Bug c++/23441] New: wrong "control may reach end of non-void function" with -O pierre dot chatelier at club-internet dot fr
2005-08-17 15:16 ` [Bug c++/23441] [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).