aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/warn/ref-temp1.C
blob: 26f1ca5de84b6945a0f5dce80c9ad6fa62fd6799 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/986
// { dg-options "-Wall -Wextra" }

struct X { X (int); };

struct Y {
  Y ();
  const X &x;			// note the ampersand
};

Y::Y () : x(1) {}		// { dg-warning "temporary" }