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: [RFC] Add UNARY_PLUS_EXPR to C++ front-end


Roger Sayle wrote:
The following is a request for comment, or more accurately a request
for help, from the C++ folks for a patch to introduce a new front-end
tree code for C++'s unary plus operator.

Great!


FAIL: g++.dg/template/nontype11.C (test for excess errors)

which fails due to the error message:

nontype11.C:14: error: '+1' is not a valid template argument for type
'int' because it is a non-constant expression

I would have expected the fold_non_dependent_expr call in convert_nontype_argument to take care of that. It should eventually call build_x_unary_op (UNARY_PLUS_EXPR, ...), and then that should fold things away. Would you look down that path and see what's going wrong?


The rest of the patch looks sensible enough, at first blush, but I've not done a thorough read-through yet.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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