aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/warn/Wreturn-type-5.C
blob: 8a19d646fa2db7cbeeb4ef2faf28f3cf2c20a084 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/36254
// { dg-do compile }
// { dg-options "-Wreturn-type" }

int i, j, k;
struct X { X (); ~X (); };

bool
foo ()
{
  X x;
  if (i && j)
    {
      if (k)
	return true;
      else
	return false;
    }
  else
    return false;
}