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


Sorry for the confusion, but I really meant fold_if_not_in_template()
instead of fold_non_dependent_expr() in the previous mail. So, this is how
it should have been:


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

Yes, but build_x_unary_op() calls fold_if_not_in_template(), which in turns
just
calls fold(). fold() was able to strip CONVERT_EXPR from the INTEGER_CST,
but
it does not know about UNARY_PLUS_EXPR. Instead of teaching fold() abou
UNARY_PLUS_EXPR, I suggested patching fold_if_not_in_template(), while we
are
waiting someone to implement our beloved cxx_fold(). See my suggestion here:
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02472.html


Do you agree on this?
-- 
Giovanni Bajo


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