2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / arm14.C
blob9e51f0e3c6df7c8a98e7e1764a56c7674c02133b
1 // { dg-do assemble  }
2 // GROUPS passed ARM-compliance
3 // unsorted.2 file
4 // Message-Id: <BpBu19.GrF@math.waterloo.edu>
5 // Date: Thu, 4 Jun 1992 15:07:56 GMT
6 // Subject: access control
7 // From: gjditchf@plg.waterloo.edu (Glen Ditchfield)
10 class X {
11   private:
12     enum E1 {a1, b1}; // { dg-error "" } private
13   public:
14     enum E2 {a2, b2};
15     };
17 void h(X* p) {
18     X::E2 e2;
19     int x2 = X::a2;
21     X::E1 e1;                   // { dg-error "" } within this context
22     int x1 = X::a1;             // { dg-error "" } Should be rejected, and is.
23     }