This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Internal compiler error 90. Bug report


Roberto Viviani <rv103@hermes.cam.ac.uk> writes:

> The following code snippet generates the error message 'Internal compiler
> error 90. Please submit a full bug report to etc.':

> template<class T> class baseclass { public: typedef int* iterator;
> };

> template<class T> class derived : public baseclass<T> {
> public:
> 	typedef baseclass<T> base;
> 	void f(base::iterator i);	//this compiles ok
> 	class internal {
> 	public:
> 		void g(base::iterator i);  //<- error here
> 	};
> };

I can't reproduce your problem with the latest snapshot of egcs.
Anyway, you're required to precede template-dependent qualified type
names with the `typename' keyword, i.e., you should write `typename
base::iterator' instead of just `base::iterator', because the compiler 
can't know at template parse time whether base::iterator will be the
name of a type or of a member.  egcs accepts base::iterator at certain 
points as an extension.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]