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: Inner template classes confuse gcc-2.95 and gcc-2.95.1 compiler


Here's a shorter version of your bug report in
http://egcs.cygnus.com/ml/gcc-bugs/1999-08/msg01036.html .  As you
implied, removing the "class N" wrapper eliminates the error message, so
that this is indeed a problem with member templates:

class N {
	template<class> class X {};
	class Y {
		friend X<int>;
	};
};

Alexander Zvyagin submitted a report on exactly the same problem a few
days ago, in http://egcs.cygnus.com/ml/gcc-bugs/1999-08/msg00824.html . 
He also pointed out that (in his example and in the simplified version
of yours above), you can work around the error by using the full name of
the template class like this:

	friend N::X<int>;

Unfortunately, doing this in your full example causes an ICE. :-(

This may also be related to the bug I reported in
http://egcs.cygnus.com/ml/gcc-bugs/1999-08/msg00822.html and
http://egcs.cygnus.com/ml/gcc-bugs/1999-08/msg00823.html , but it's not
as clear.

-- 
----------------------------------------------------------------------
Paul Burchard   <burchard@pobox.com>   http://www.pobox.com/~burchard/
----------------------------------------------------------------------


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