This is the mail archive of the
mailing list for the GCC project.
Re: Strange behavior
- To: Jimen Ching <jching at flex dot com>
- Subject: Re: Strange behavior
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 01 Mar 1998 21:21:55 -0300
- Cc: egcs-bugs at cygnus dot com
- References: <Pine.BSI.3.95.980228161602.5196Bemail@example.com>
Jimen Ching writes:
> You cut off the sentence where I said g++ did not warn about a typename.
> I've already tried typename, and it didn't work either.
Which version of egcs, on which platform? Both 1.0.1 and the latest
snapshot compile that fine for me, even without typename (which, IMHO,
> But my point was that g++ didn't warn about typename and gave an
> error instead. A parse error at that. You would think that a
> missing typename would be a semantic error, not a parse error.
Nope, the `typename' keyword is required to tell the parser that what
follows is a type name, not a static member variable or function. The
C++ Standard states that, if a template-argument-dependent qualified
name is not preceded by the `typename' keyword, it is not to be
considered a type name.
Universidade Estadual de Campinas, SP, Brasil