OSDN Git Service

* decl.c (compute_array_index_type): Don't try to do anything with
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / enum14.C
1 // Build don't link:
2 // Copyright (C) 2000 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 4 Oct 2000 <nathan@codesourcery.com>
4 // Origin: bug 511 malte.starostik@t-online.de
5
6 // Bug 511. We failed to set access correctly for enumeration members of
7 // template classes
8
9 template <class>
10 class A
11 {
12   public:
13   enum foo {bar};
14   typedef int baz;
15 };
16
17 struct C: public A<int>
18 {
19   void choke (foo);
20   void choke (baz);
21 };
22
23 template <class>
24 struct B
25 {
26   private:
27   enum foo {bar}; // ERROR - private
28   typedef int baz;  // ERROR - private
29 };
30
31 struct D: public B<int>
32 {
33   void choke (foo);   // ERROR - within this context
34   void choke (baz);   // ERROR - within this context
35 };
36