This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Internal compiler error 61. (another c++ code that no longer compile under under 2.95)
- To: christophe dot broult at info dot unicaen dot fr
- Subject: Re: Internal compiler error 61. (another c++ code that no longer compile under under 2.95)
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 10 Aug 1999 22:03:24 +0200
- CC: gcc-bugs at gcc dot gnu dot org
- References: <87r9lbivgh.fsf@chicago.lpv.info>
> #include <iostream>
> #include <iterator>
>
> template <class T>
> class Base {
> public:
> typedef T value_type;
> };
>
> template <class T>
> class Derived : public Base<T> {
> public:
> void foo(value_type) {}
> };
>
> int main()
> {
> cout << "OK" << endl;
> return 0;
> }
Thanks for your bug report. This will be fixed in gcc 2.95.1
(hopefully), which will report
a.cc:13: variable or field `foo' declared void
a.cc:13: template declaration of `int foo'
a.cc:13: syntax error before `{'
a.cc:13: missing ';' before right brace
The problem is that 'value_type' is a global, here, and not from the
base class. Welcome to standard C++.
Regards,
Martin