aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/ref1.C
blob: b6d82aa25ca4cddb23d4aee26b0cfa5e2ab53726 (plain)
1
2
3
4
5
6
7
8
9
10
// Build don't link:

int f();

void g()
{
  const int& i = f(); // OK
  int& j = f(); // ERROR - initialization of non-const reference 
  const volatile int& k = f(); // ERROR - initialization of volatile ref
}