This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questionable 1.1 C++ parsing
- To: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Subject: Re: Questionable 1.1 C++ parsing
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 17 Sep 1998 22:02:20 +-300
- Cc: egcs at cygnus dot com (egcs at cygnus dot com)
- References: <199809171457.QAA11333@jolan.ppro>
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