* tree.c (build_target_expr): Copy the location from value.
From-SVN: r226580
This commit is contained in:
parent
cb3582ef4b
commit
f107ee3310
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2015-08-04 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* tree.c (build_target_expr): Copy the location from value.
|
||||
|
||||
2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
|
||||
|
||||
* parser.c (cp_parser_selection_statement): Move handling of
|
||||
|
|
|
@ -338,6 +338,8 @@ build_target_expr (tree decl, tree value, tsubst_flags_t complain)
|
|||
if (t == error_mark_node)
|
||||
return error_mark_node;
|
||||
t = build4 (TARGET_EXPR, type, decl, value, t, NULL_TREE);
|
||||
if (EXPR_HAS_LOCATION (value))
|
||||
SET_EXPR_LOCATION (t, EXPR_LOCATION (value));
|
||||
/* We always set TREE_SIDE_EFFECTS so that expand_expr does not
|
||||
ignore the TARGET_EXPR. If there really turn out to be no
|
||||
side-effects, then the optimizer should be able to get rid of
|
||||
|
|
Loading…
Add table
Reference in a new issue