summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/warning8.C
blob: d6ea821eb902ca375a749e14f6293151b29001ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Build don't link:

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

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

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