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)


Roger Sayle <roger@eyesopen.com> writes:

| On Thu, 26 May 2005, Mark Mitchell wrote:
| > Gabriel Dos Reis wrote:
| > > Roger Sayle <roger@eyesopen.com> writes:
| > > Sorry for not having commented earlier, but I think you need to add
| > > the pretty printing of UNARY_PLUS_EXPR in cxx-pretty-print.c too.
| >
| > Yes, this is OK.
| 
| 
| Rather than repost the entire patch, I thought it easier on the
| reviewers to just post the additional hunk to provide support for

Agreed.

| UNARY_PLUS_EXPR in cxx-pretty-print.c.  Whilst current mainline
| won't ever display a unary plus via the C++ pretty printer, I
| agree with Gabriel that the introduction of a new front-end
| tree code, with unknown side-effects in the pretty printer logic,
| makes handling UNARY_PLUS_EXPR more than just a feature request.
| 
| The following hunk together with the previous version of the
| UNARY_PLUS_EXPR patch have been tested on x86_64-unknown-linux-gnu
| with a full "make bootstrap", all default languages, and regression
| tested with a top-level "make -k check" with no new failures.
| 
| Unfortunately, I've absolutely no idea how to actually test this
| new functionality.  Hopefully, anyone that feels strongly enough
| to require a new testcase, can suggest/commit one themselves.
| 
| Ok to commit both patches simultaneously?

Thanks for doind this.  The addition of the code should be in
pp_cxx_unary_expression, which has the following comments:

    /* unary-expression:
          postfix-expression
          ++ cast-expression
          -- cast-expression
          unary-operator cast-expression
          sizeof unary-expression
          sizeof ( type-id )
          new-expression
          delete-expression

       unary-operator: one of
          *   &   +   -  !

       GNU extensions:
          __alignof__ unary-expression
          __alignof__ ( type-id )  */


The patch is OK with that change.  Thanks!

-- Gaby


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