public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-11] C/C++: Fix unused set var warning with omp_clause_affinity [PR100913]
@ 2021-06-15 9:32 Tobias Burnus
0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2021-06-15 9:32 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:66cb57df88c42ea007d36663bb0f1c7991653b7c
commit 66cb57df88c42ea007d36663bb0f1c7991653b7c
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Tue Jun 15 10:45:52 2021 +0200
C/C++: Fix unused set var warning with omp_clause_affinity [PR100913]
PR c/100913
gcc/c/ChangeLog:
* c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
var in the error case.
gcc/cp/ChangeLog:
* parser.c (cp_parser_omp_clause_affinity): No need to set iterator
var in the error case.
(cherry picked from commit 12d13cf50fe68c898ee65d71d1ba9cdb3ea07996)
Diff:
---
gcc/c/ChangeLog.omp | 9 +++++++++
gcc/c/c-parser.c | 4 +---
gcc/cp/ChangeLog.omp | 9 +++++++++
gcc/cp/parser.c | 4 +---
4 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/gcc/c/ChangeLog.omp b/gcc/c/ChangeLog.omp
index 2f9d98bca6f..35b6f746ccb 100644
--- a/gcc/c/ChangeLog.omp
+++ b/gcc/c/ChangeLog.omp
@@ -1,3 +1,12 @@
+2021-06-15 Tobias Burnus <tobias@codesourcery.com>
+
+ Backported from master:
+ 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
+
+ PR c/100913
+ * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
+ var in the error case.
+
2021-06-04 Tobias Burnus <tobias@codesourcery.com>
Backported from master:
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 286d45e4ace..dd2553cd35d 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -15619,9 +15619,7 @@ c_parser_omp_clause_affinity (c_parser *parser, tree list)
if (iterators)
{
tree block = pop_scope ();
- if (iterators == error_mark_node)
- iterators = NULL_TREE;
- else
+ if (iterators != error_mark_node)
{
TREE_VEC_ELT (iterators, 5) = block;
for (tree c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
diff --git a/gcc/cp/ChangeLog.omp b/gcc/cp/ChangeLog.omp
index 87f22832c30..64a006c01f7 100644
--- a/gcc/cp/ChangeLog.omp
+++ b/gcc/cp/ChangeLog.omp
@@ -1,3 +1,12 @@
+2021-06-15 Tobias Burnus <tobias@codesourcery.com>
+
+ Backported from master:
+ 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
+
+ PR c/100913
+ * parser.c (cp_parser_omp_clause_affinity): No need to set iterator
+ var in the error case.
+
2021-06-04 Tobias Burnus <tobias@codesourcery.com>
Backported from master:
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 89eed507880..a46327843b4 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -37822,9 +37822,7 @@ cp_parser_omp_clause_affinity (cp_parser *parser, tree list)
if (iterators)
{
tree block = poplevel (1, 1, 0);
- if (iterators == error_mark_node)
- iterators = NULL_TREE;
- else
+ if (iterators != error_mark_node)
{
TREE_VEC_ELT (iterators, 5) = block;
for (c = nlist; c != list; c = OMP_CLAUSE_CHAIN (c))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-15 9:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 9:32 [gcc/devel/omp/gcc-11] C/C++: Fix unused set var warning with omp_clause_affinity [PR100913] Tobias Burnus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).