This is the mail archive of the gcc@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: Questionable 1.1 C++ parsing


Carlo Wood <carlo@runaway.xs4all.nl> writes:

> |   int baz(int(foo(bar())));

>   int baz(int(foo(3)));

> Gives the same error, and is slightly less complex.

Good point, thanks.  However, instead of `3', I prefer `0' :-)

>   int baz((int(foo())));

> compiles fine (note the extra () around the initialisation value of baz).

Yup, an argument declaration can't possibly start with parentheses, so
this is correctly parsed as an initializer.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br 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]