a typename is required !

Gabriel Dos Reis Gabriel.Dos-Reis@dptmaths.ens-cachan.fr
Fri Jul 10 15:54:00 GMT 1998


>>>>> «Martin», Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de> wrote:

Martin> [implicit typename]
>> My feeling is that this extension should not be on by default...

Martin> This is (or should be) a configuration issue. Some companies are
Martin> packaging gcc so that it works in ANSI mode by default (i.e. as c89).

Martin> The plain gcc is generous to accept non-compliant code as long as it
Martin> is not ambiguous.

Martin> As for the typename construct: It was introduced into C++ only
Martin> recently, so many programs won't have. OTOH, if you use it, other
Martin> compilers might reject your code.

I can understand your argument. But then why doesn't egcs do the same
thing, i.e. issueing a warning, as with identifiers defined in
for-loops ? AFAIK that rule was also added recently. IMHO, the best
thing to do would be to provide a switch for those non conforming codes.
There are also projects which rely on egcs conforming behaviour. 


-- Gaby



More information about the Gcc-bugs mailing list