diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 86a8f1c28c1c..3dd505579078 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2017-08-24 David Malcolm + + * c-lex.c (interpret_float): Use token location + when building an EXCESS_PRECISION_EXPR. + 2017-08-21 David Malcolm * c-common.c (check_function_arguments): Add "arglogs" param; pass diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c index 3765a800a579..a614b266baf1 100644 --- a/gcc/c-family/c-lex.c +++ b/gcc/c-family/c-lex.c @@ -988,7 +988,7 @@ interpret_float (const cpp_token *token, unsigned int flags, } if (type != const_type) - value = build1 (EXCESS_PRECISION_EXPR, type, value); + value = build1_loc (token->src_loc, EXCESS_PRECISION_EXPR, type, value); return value; } diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index f58b4023cf49..0cf7bd26167e 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2017-08-24 David Malcolm + + * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather + than CAN_HAVE_LOCATION_P when determining whether to use the + location_t value within "value". + 2017-08-21 David Malcolm * c-parser.c (c_parser_expr_list): Use c_expr::get_location () diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h index 5182cc539ece..96c7ae7613ff 100644 --- a/gcc/c/c-tree.h +++ b/gcc/c/c-tree.h @@ -149,7 +149,7 @@ struct c_expr location_t get_location () const { - if (CAN_HAVE_LOCATION_P (value)) + if (EXPR_HAS_LOCATION (value)) return EXPR_LOCATION (value); else return make_location (get_start (), get_start (), get_finish ());