This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Add UNARY_PLUS_EXPR to C++ front-end (take 2)
- From: Roger Sayle <roger at eyesopen dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Mark Mitchell <mark at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 27 May 2005 17:05:54 -0600 (MDT)
- Subject: Re: [PATCH] Add UNARY_PLUS_EXPR to C++ front-end (take 2)
On 28 May 2005, Gabriel Dos Reis wrote:
> Roger Sayle <email@example.com> writes:
> Thanks for doind this. The addition of the code should be in
> pp_cxx_unary_expression, which has the following comments:
If you look closely, you'll see that this code was added to
pp_cxx_unary_expression (and even mentioned in the ChangeLog)
precisely because of the helpful comment you cited. The thing
that might have been confusing is that because the syntax is:
>> /* unary-expression:
>> unary-operator cast-expression
we now need to call "cast-expression" from "unary-expression".
As a result, with my change pp_cxx_unary_expression needs to invoke
pp_cxx_cast_expression, which unfortunately is defined later in the
source file. As a result, I have to add a new prototype for the
function pp_cxx_cast_expression even though my functional change
is to pp_cxx_unary_expression.
I hope this make sense.
Thanks for the review.