Questionable 1.1 C++ parsing
Alexandre Oliva
oliva@dcc.unicamp.br
Thu Sep 17 22:12:00 GMT 1998
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
More information about the Gcc
mailing list