On 08/10/2012 01:21 PM, Dehao Chen wrote:
gimplify.c (gimplify_call_expr)
2486 /* For reliable diagnostics during inlining, it is necessary that
2487 every call_expr be annotated with file and line. */
2488 if (! EXPR_HAS_LOCATION (*expr_p))
2489 SET_EXPR_LOCATION (*expr_p, input_location);
Shall we remove this code? Because I don't expect the location to be
unknown in other cases.
The code above is unnecessary for C++, because build_cxx_call already
sets the location on CALL_EXPRs:
/* Remember roughly where this call is. */
location_t loc = EXPR_LOC_OR_HERE (fn);
fn = build_call_a (fn, nargs, argarray);
SET_EXPR_LOCATION (fn, loc);
I don't know about other front ends.
Jason