From 344b0fdf2ee426f81cf8ceafa069c42cfdc9f5fc Mon Sep 17 00:00:00 2001 From: James Norris Date: Fri, 30 Nov 2018 20:39:40 +0000 Subject: [PATCH] [C++] Use existing local variable in cp_parser_oacc_enter_exit_data gcc/cp/ * parser.c (cp_parser_oacc_enter_exit_data): Use existing local variable. Reviewed-by: Thomas Schwinge From-SVN: r266687 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parser.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 98a2528783a..2c8b7d10ae4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2018-11-30 James Norris + + * parser.c (cp_parser_oacc_enter_exit_data): Use existing local + variable. + 2018-11-29 Paolo Carlini * decl.c (compute_array_index_type_loc): New, like the current diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 3ef1eda4518..634485b5a8c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -38472,7 +38472,7 @@ cp_parser_oacc_enter_exit_data (cp_parser *parser, cp_token *pragma_tok, stmt = enter ? make_node (OACC_ENTER_DATA) : make_node (OACC_EXIT_DATA); TREE_TYPE (stmt) = void_type_node; OMP_STANDALONE_CLAUSES (stmt) = clauses; - SET_EXPR_LOCATION (stmt, pragma_tok->location); + SET_EXPR_LOCATION (stmt, loc); add_stmt (stmt); return stmt; } -- 2.30.2