Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wreturn-type-5.C
blob8a19d646fa2db7cbeeb4ef2faf28f3cf2c20a084
1 // PR c++/36254
2 // { dg-do compile }
3 // { dg-options "-Wreturn-type" }
5 int i, j, k;
6 struct X { X (); ~X (); };
8 bool
9 foo ()
11   X x;
12   if (i && j)
13     {
14       if (k)
15         return true;
16       else
17         return false;
18     }
19   else
20     return false;