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]: Handle CONJ_EXPR in negate_expr_p and fold_negate_expr



For example, (a,b) + -~(x,5) would change to (a,b) + (-x,5) which is
wrong; but (a,b) + -~(5,x) would change to (a,b) + (-5,x) which is ok.

The patch does fold -~z to ~-z which is ok, can you elaborate why -~(x,5) -> (-x,5) is wrong? (it wouldn't do that, beause negate_expr_p will return false for (x,5))

For the same reason which Kaveh explained in his previous patch.


Paolo


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