On 05/14/2012 07:17 PM, Paolo Carlini wrote:
@@ -5670,7 +5672,8 @@ build_x_compound_expr_from_list (tree list, expr_l return error_mark_node;for (list = TREE_CHAIN (list); list; list = TREE_CHAIN (list)) - expr = build_x_compound_expr (expr, TREE_VALUE (list), + expr = build_x_compound_expr (EXPR_LOC_OR_HERE (expr), expr, + TREE_VALUE (list), complain);
For a COMPOUND_EXPR, I think the relevant location is that of the comma, and since we don't have that location I think the location of the second expression is a closer approximation.
Note that when copying the location from one expression to another, EXPR_LOC_OR_HERE will change UNKNOWN_LOCATION to input_location, whereas EXPR_LOCATION will leave it alone.
Jason
