This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25973] [4.0/4.1/4.2 Regression] Wrong warning: control reaches end of non-void function
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2006 13:57:49 -0000
- Subject: [Bug c++/25973] [4.0/4.1/4.2 Regression] Wrong warning: control reaches end of non-void function
- References: <bug-25973-3118@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-01-26 13:57 -------
Confirmed, the problem is slightly different from PR 20624 (but it is related).
I might look at this more.
-----
We are adding an extra goto when gimplifing. I have not looked why yet.
if (p == 4)
{
D.1782 = 1;
return D.1782;
}
else
{
D.1782 = 2;
return D.1782;
}
goto <D1781>;
That goto is causing the whole issue.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC host triplet|sparc-sun-solaris2.8 |
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2006-01-26 13:57:49
date| |
Summary|Wrong warning: control |[4.0/4.1/4.2 Regression]
|reaches end of non-void |Wrong warning: control
|function |reaches end of non-void
| |function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25973