This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bug: Parse error or C++ language ambiguity?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]