aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJames Norris <jnorris@codesourcery.com>2018-11-30 20:39:40 +0000
committerThomas Schwinge <tschwinge@gcc.gnu.org>2018-11-30 21:39:40 +0100
commit344b0fdf2ee426f81cf8ceafa069c42cfdc9f5fc (patch)
treee8d0367ebe79a058bbc3a6371b6400c51ed1d69c /gcc
parent020dd8e4a099df17f76e0ad15085ab865d57c63c (diff)
downloadgcc-344b0fdf2ee426f81cf8ceafa069c42cfdc9f5fc.zip
gcc-344b0fdf2ee426f81cf8ceafa069c42cfdc9f5fc.tar.gz
gcc-344b0fdf2ee426f81cf8ceafa069c42cfdc9f5fc.tar.bz2
[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 <thomas@codesourcery.com> From-SVN: r266687
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/parser.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 98a2528..2c8b7d1 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2018-11-30 James Norris <jnorris@codesourcery.com>
+
+ * parser.c (cp_parser_oacc_enter_exit_data): Use existing local
+ variable.
+
2018-11-29 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (compute_array_index_type_loc): New, like the current
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 3ef1eda4..634485b 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;
}