This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
- From: "bernd dot speiser at uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jul 2004 11:30:51 -0000
- Subject: [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
- References: <20040630113614.16295.kai.ludwig@uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bernd dot speiser at uni-tuebingen dot de 2004-07-01 11:30 -------
(In reply to comment #8)
I'm the original writer of this code, so I'll comment on the third parameter.
> And as a last note: If I fix the code like so:
>
> template<template<class, class> class Q1, class GT1, class Head1,
> class Tail1, class DU1, class U1,
> template<class, class> class Q2, class GT2, class Head2,
> class Tail2, class DU2, class U2, class DT>
> struct GenerateVariable
> <Q1<Quantity<GT1, Typelist<Head1, Tail1>, DU1, DT>, U1>,
> Q2<Quantity<GT2, Typelist<Head2, Tail2>, DU2, DT>, U2> >
> {
> private:
>
> typedef typename Dimension<GT1>::template Add<Dimension<GT2> >::Class
> AddT;
> typedef NonPrefixable<GenericClass<AddT>, GenericUnit> AddU;
> //...
> };
>
> then it compiles cleanly. Note that the 'template' keyword in the declaration
> of AddT is necessary. I removed the erroneous third template parameter
> in the declaration of AddU, but I have of course no clue what you originally
> intended there.
NonPrefixable really takes THREE parameters, with DT being the last one and
having a default value of double. Thus, if you leave it off, as in this example,
then the last parameter to NonPrefixable is just taken as double.
I understand that 3.4 handles the missing `template' keyword now correctly, right?
We'll test this, and report back what we find.
Still, the question remains, why the -pedantic flag results in NOT crashing??
Bernd
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295