1 // Error: Internal Compiler Error in GCC 2.7.2 and EGCS 1998/05/28 snapshot. 2 3 #include <iostream> 4 5 class some_base 6 { 7 public: 8 class base_func_args; 9 virtual void func(base_func_args &) = 0; // ERROR - referenced below 10 }; 11 12 class some_base::base_func_args 13 { 14 public: 15 int i; 16 }; 17 18 class some_derived : public some_base 19 { 20 public: 21 class derived_func_args; 22 void func(derived_func_args &); 23 }; 24 25 26 class derived_func_args : public some_base::base_func_args 27 { 28 public: 29 float f; 30 }; 31 func(derived_func_args & a)32class some_derived::func(derived_func_args &a) // ERROR - illegal member syntax 33 { 34 std::cout << a.i << ' ' << a.f << std::endl; 35 } 36 37 int main()38main() 39 { 40 some_derived d; // ERROR - abstract class 41 some_derived::derived_func_args dfa; // ERROR - incomplete class 42 some_base *b = &d; 43 44 dfa.i = 10; 45 dfa.f = 20; 46 b->func(dfs); // ERROR - dfs not declared 47 return 0; 48 } 49