This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Proposal for extension to GCC
- To: Ted Clancy <clancyt at look dot ca>
- Subject: Re: Proposal for extension to GCC
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 19 Aug 2000 02:15:09 -0300
- Cc: gcc at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <00081900095301.00669@Charlie>
On Aug 19, 2000, Ted Clancy <clancyt@look.ca> wrote:
> 1) First of all, C++ is NOT YACCable.
Indeed. But since we must support the Standard syntax, it won't
become YACCable just because of your proposal.
> or the token sequence 'A()' could be the construction of a temporary object.
> I want it to be the latter, but it's interpreted as the former.
This isn't going to change, because this is what the Standard
mandates. Unless you manage to convince change the Standard, which
won't happen in the near future anyway.
> And just change
> B b(A(), A());
> to
> B b(A, A); //explicitly made a function declaration.
But a different one :-)
Or maybe you meant:
B b(A (*)(), A (*)());
> It's much harder to specifiy that you want the ambiguous token
> sequence to be an expression.
Indeed. You have to enclose the ambiguous expressions in parentheses:
B b((A()), (A()));
(int(*a)), b, c;
(int(*a), b, c);
But this probably fails in GCC, because its parser isn't fully
compliant with the Standard.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me