C++ PATCH: PR3637
Mark Mitchell
mark@codesourcery.com
Sat Nov 17 20:51:00 GMT 2001
--On Wednesday, November 28, 2001 12:45:59 AM +0100 Peter Schmid
<schmid@snake.iap.physik.tu-darmstadt.de> wrote:
> Dear Mr Mitchell,
>
> first of all, thank you very much for fixing gcc 3.0.2 regressions.
>
> After applying your patches, current gcc does compile memtemp.C without
> an internal compiler error, but I am not sure if the printout of
> the executable compiled by gcc 3.1 20011125 is indeed correct.
Actually, the code is invalid, and G++ should issue an error.
The problem is that c1<typename traits<_T>::next> is a dependent
type; you should have to write your code like this:
typename c1<typename traits<_T>::next>::template c2<void>();
If you do write this, G++ generates correct code.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-bugs
mailing list