C++: fix for template ICE

Paul Burchard burchard@pobox.com
Tue Aug 31 22:45:00 GMT 1999


Thanks, Martin, with your patch the correct programs in my earlier bug
report compile.  But I get another ICE by doing just a little more with
the member template.  If to my previous test case, I add instantiation
of the template Q::X inside the functional Y to which it is passed, 

	class Q { template<class T> class X {}; };
	template<template<class> class XX> class Y { XX<int> x_; };
	Y<Q::X> y;

gcc gives a generic ICE.  Again, the above program compiles without
error when Q::X is replaced by the same X defined at namespace scope
instead of class scope.

The one other tiny side effect I saw from this patch was that it changed
the following program (which is probably a syntax error) from getting a
generic ICE, to getting the specific ICE 19990331.  Don't know if that
helps, but here it is:

	class Q { template<class> class X {}; };
	Q::template X<int> x1;  // syntax?

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



More information about the Gcc-bugs mailing list