Bug: Parse error or C++ language ambiguity?

Alexandre Oliva oliva@dcc.unicamp.br
Sat Oct 10 08:06:00 GMT 1998


Charles Durst <cdurst@world.std.com> writes:

> The problem (as can be seen by uncommenting line 1) is that GCC mistakes
> it for a declaration of a global function named "foo".

Yes, but it is getting it wrong.  That statement cannot be a
declaration, so it should be re-parsed as a statement.  That's quite
hard to do, but Mark Mitchell is working on that, AFAIK.  We've got a
testcase for this problem in the testsuite already.

Thanks for your report anyway.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil




More information about the Gcc-bugs mailing list