summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/enum6.C
blob: 29908b81d116e5efbcaf3933e2e96829280c88b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }
// GROUPS passed enums
class X {
  private:
    enum E1 {a1, b1}; // { dg-error "" } private
  public:
    enum E2 {a2, b2};
    };

void h(X* p) {
    X::E2 e2;
    int x2 = X::a2;

    X::E1 e1;	     // { dg-error "" } within this context
    int x1 = X::a1;  // { dg-error "" } within this context
    }