------- Comment #24 from pluto at agmk dot net 2008-04-16 08:03 -------
(In reply to comment #23)
> Fixed in 4.0.2 and above.
>
i have one more testcase which still exposes this bug.
$ cat 0.cpp
struct X
{
X();
~X();
};
bool f( int k )
{
X x;
switch ( k )
{
default:
return false;
break;
}
}
$ g++ 0.cpp -Wall -fdump-tree-gimple -g0 -c -o /dev/null
0.cpp: In function ‘bool f(int)’:
0.cpp:16: warning: control reaches end of non-void function
$ cat 0.cpp.004t.gimple
bool f(int) (k)
{
bool D.2056;
struct X x;
__comp_ctor (&x);
try
{
switch (k)
{
default : goto <D.2054>;
}
<D.2054>:;
D.2056 = 0;
return D.2056;
goto <D.2055>;
<D.2055>:;
}
finally
{
__comp_dtor (&x);
}
}
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20624