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] PR 44516


On 05/13/2012 11:24 PM, Paolo Carlini wrote:
     tree r = build_x_modify_expr
-      (RECUR (TREE_OPERAND (t, 0)),
+      (input_location,

And EXPR_LOC_OR_HERE (t).
Here I think EXPR_LOC_OR_HERE (TREE_OPERAND (t, 1)) is better.

Why? TREE_OPERAND (t,1) is a dummy tree that we only use for its code.


Of course, currently it doesn't matter because we don't SET_EXPR_LOCATION on either the MODOP_EXPR or its operand 1, so EXPR_LOC_OR_HERE on either one will give input_location.

I guess we want a build_min_nt_loc function.

Jason


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