re PR middle-end/16558 (bogus missing-return warning)
PR middle-end/16558 * g++.dg/warn/Wreturn-type-2.C: New test. From-SVN: r94382
This commit is contained in:
parent
09f8cf2de9
commit
6aea8136e2
|
@ -1,3 +1,8 @@
|
|||
2005-01-28 Ian Lance Taylor <ian@airs.com>
|
||||
|
||||
PR middle-end/16558
|
||||
* g++.dg/warn/Wreturn-type-2.C: New test.
|
||||
|
||||
2004-06-24 Jeff Law <law@redhat.com>
|
||||
|
||||
* gcc.dg/tree-ssa/20050128-1.c: New test.
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// PR middle-end/16558
|
||||
// { dg-options "-Wreturn-type" }
|
||||
|
||||
struct C
|
||||
{
|
||||
C ();
|
||||
~C ();
|
||||
};
|
||||
|
||||
int getref (int ndx)
|
||||
{
|
||||
C d;
|
||||
|
||||
if (ndx != 0) {
|
||||
C base;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue