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: [C++ PATCH] [PR18354] Unary plus as template argument


The most recent patch is ok, but whilst you're there how about breaking
this assignment
! 	if (!(arg = build_expr_type_conversion (flags, arg, true)))
! 	  errstring = (code == NEGATE_EXPR
! 		      ? "wrong type argument to unary minus"
! 		      : "wrong type argument to unary plus");
out of the conditional?

btw, you can also keep Kazu happy by fixing the typo here
! 	    /* Make sure the result is not a lvalue: an unary plus or minus
! 	       expression is always a rvalue.  */
it's 'a unary plus'. Here the 'u' is pronounced as 'you', so 'a' is correct,
if it were 'uh' (as in 'umpire'), 'an' would be appropriate.

ok with those changes.

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


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