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] Set correct source location for deallocator calls


On 2012-08-10 14:55, Dehao Chen wrote:
> I see your point. But the problem is that the above code is in
> gimplify_call_expr, in which we have no idea if it is in a
> TRY_FINALLY/TRY_CATCH block.

That's why I suggested saving and restoring input_location
while gimplifying try_finally.

i.e.

	location_t save_loc = input_location;
	input_location = UNKNOWN_LOCATION;

	gimplify_and_add (TREE_OPERAND (*expr_p, 1), &cleanup);

	input_location = save_loc;

You may not even need the save_loc, since gimplify_expr already
has an outer saved_location.


r~


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