aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ns/ns11.C
blob: ffc5acbb8394ba30be360e0b5b7e26cc22c09ebe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Build don't link
// Check [namespace.memdef]/2

namespace A{
  void f(int);
  void f(int,int);
  int i;              // ERROR - .*
}

void A::f(){}         // ERROR - should have been declared before

namespace B{
  void A::f(int){}    // ERROR - B does not surround A
}

int A::i;             // ERROR - redefinition

void A::f(int,int){}  // ok