This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] Add UNARY_PLUS_EXPR to C++ front-end (take 2)


On 28 May 2005, Gabriel Dos Reis wrote:
> Roger Sayle <roger@eyesopen.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.

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]