aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-10-31 22:04:39 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-10-31 22:04:39 -0400
commitec52b1115dda4b0e38aa5620b0c3914b69008a24 (patch)
treec668c63e9650ae10b834fb88da25c23030215504 /gcc/c-decl.c
parent202be748c9997016f1b08c98291db4b7b9b02a5f (diff)
downloadgcc-ec52b1115dda4b0e38aa5620b0c3914b69008a24.zip
gcc-ec52b1115dda4b0e38aa5620b0c3914b69008a24.tar.gz
gcc-ec52b1115dda4b0e38aa5620b0c3914b69008a24.tar.bz2
tree.h (EXPR_LOC_OR_HERE): New macro.
* tree.h (EXPR_LOC_OR_HERE): New macro. * builtins.c (c_strlen): Use it. * c-decl.c (build_enumerator): Likewise. * gimplify.c (internal_get_tmp_var): Likewise. (shortcut_cond_expr): Likewise. (gimplify_one_sizepos): Likewise. c-family/ * c-common.c (conversion_warning, warn_for_collisions_1): Use EXPR_LOC_OR_HERE. cp/ * decl.c (pop_switch): Use EXPR_LOC_OR_HERE. * typeck.c (convert_for_assignment): Likewise. From-SVN: r166123
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index a06d073..bb7cf64 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -7499,9 +7499,8 @@ build_enumerator (location_t decl_loc, location_t loc,
/* Set basis for default for next value. */
the_enum->enum_next_value
- = build_binary_op
- (EXPR_HAS_LOCATION (value) ? EXPR_LOCATION (value) : input_location,
- PLUS_EXPR, value, integer_one_node, 0);
+ = build_binary_op (EXPR_LOC_OR_HERE (value),
+ PLUS_EXPR, value, integer_one_node, 0);
the_enum->enum_overflow = tree_int_cst_lt (the_enum->enum_next_value, value);
/* Now create a declaration for the enum value name. */