templates: crashes on ctor initting templated base class

Kriang Lerdsuwanakij lerdsuwa@scf-fs.usc.edu
Sun Dec 27 19:05:00 GMT 1998


> This is starting to use some of the more advanced template options,
> so I'm not 100% sure of the syntax, but I think:
> 
>         class A;
>         template<template<class Ignored> class base> class C : 
>						public base<A> {
>          public:
>             C(A& newa) : base<A>(newa) {}
>         };
> 
> ought to be correct.  egcs crashes trying to call base(newa), and
> begs me to send this message to the list ("internal compiler error").

Thanks for the report.  This is a known bug.  A kludge that fixes the
problem can be found at
http://www.cygnus.com/ml/egcs-patches/1998-Aug/0215.html

A better way fix to the bug is not trivial and is not available yet.

--kriang



More information about the Gcc-bugs mailing list