aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.brendan/arm2.C
blob: fb1ee429d37fb88f7e894ded928fe608619804ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do assemble  }
// GROUPS passed ARM-compliance
// ARM 9.4 ``There cannot be a static and a nonstatic member function
//	     with the same name and the same argument types.''
//
// The trick is to make sure it's caught with both orders (static,
// then normal, and vice-versa.

class X {
public:
  int foo();            // { dg-error "with" }
  static int foo();	// error: redeclaration// { dg-error "overloaded" } .*
};

class Y {
public:
   static int foo();    // { dg-error "with" }
  int foo();		// error: redeclaration// { dg-error "overloaded" } .*
};