This is the mail archive of the 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)

Gabriel Dos Reis wrote:
Roger Sayle <> writes:

| Many thanks to both Mark and Giovanni for suggesting that appropriate
| fix was to fold the new UNARY_PLUS_EXPR in fold_if_not_in_template.
| This indeed fixes the g++ regression. I also took the opportunity
| to go through and audit all of the uses of CONVERT_EXPR in the cp/
| directory. I believe I've now caught all the relevant cases and the
| 12 remaining uses of CONVERT_EXPR appear to treat it as a synonym
| for NOP_EXPR.
| | The following revised patch has 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.
| | Ok for mainline?

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.

There are two other things that we need to add to the C++ front end:

1. A folder for constant-expressions. This function will be called by the front-end when an integral constant-expression appars in some situation requiring an actual integer constant, like an expression for array bounds.

2. A recursive folder for expressions. This function will be used by the gimplifier. Once we have it, we will stop calling fold/fold_if_not_in_template throughout the rest of the compiler.

I've got a partial patch for (1) that I'll try to finish up soon; then, I hope to work on (2) as well.

Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

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