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

Roger Sayle roger@eyesopen.com
Fri May 27 23:36:00 GMT 2005


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
--



More information about the Gcc-patches mailing list