This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Fwd: g++: Internal compiler error: program cc1plus got fatal signal 11]
> The compiler has and WILL HAVE (!?) problem with this construction.
[...]
> template <typename S1> friend void AAA<S1> ();
No wonder the compiler has problems with this: It is illegal code.
The compiler says
a.cc:6: template-id `AAA<S1>' in declaration of primary template
> ---> template <typename S1> friend class AAA<S1>; <---
>
> The compiler has no problem with this construction.
The compiler is wrong, this is also ill-formed. gcc 2.95 says
a.cc:8: partial specialization `AAA<S1>' declared `friend'
If you remove the errors in your program, g++ accepts the code.
Regards,
Martin