]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
C/C++: Fix unused set var warning with omp_clause_affinity [PR100913]
authorTobias Burnus <tobias@codesourcery.com>
Mon, 14 Jun 2021 14:49:24 +0000 (16:49 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 14 Jun 2021 14:49:24 +0000 (16:49 +0200)
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.

gcc/c/c-parser.c
gcc/cp/parser.c

index add33532a608b22b24711181b9b7582649a97b80..b90710cba2f8429862bb289460d9061763f430e0 100644 (file)
@@ -15596,9 +15596,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))
index b5af3877e48831fe5a655587534c1ee06b7d1b30..d57ddc4560dfb0a19d88e60a67499a27f656a736 100644 (file)
@@ -37928,9 +37928,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))