aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/warn/Wreturn-type-2.C
blob: ad59d4ec344cc44c35f2fc6a71849fad02832ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
}