summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/friend3.C
blob: ecd85b44b09733a164e161d5ba379e7e2139f9e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do assemble  }
// GROUPS passed friends
class B {

   friend class A;

   enum {
      bEnum = 1, // { dg-error "comma at end" }
   };

   int bArray[ bEnum ];

public:
   void bFunction(int arg[ bEnum ]);
};


class A {
   int aMember;

public:
   void aFunction(int a[B::bEnum])
   {
      B b;
      b.bArray[ B::bEnum ] = aMember;
   }
};