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

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

void A::f(){}         // { dg-error "" } should have been declared before

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

int A::i;             // { dg-error "" } redefinition

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