summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/warning8.C
blob: b5ff3f3de60452489f9430fa03074ef6797d8657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do assemble  }

struct A {
  A();
  ~A();
};

struct B {
  B (const A&);
  ~B ();
};

const B& f ()
{
  A a;
  return a;			// { dg-warning "" } returning reference to temporary
}