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.
@@ -15590,21 +15590,19 @@ c_parser_omp_clause_affinity (c_parser *parser, tree list)
return list;
}
}
}
nl = c_parser_omp_variable_list (parser, clause_loc, OMP_CLAUSE_AFFINITY,
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))
OMP_CLAUSE_DECL (c) = build_tree_list (iterators,
OMP_CLAUSE_DECL (c));
}
}
parens.skip_until_found_close (parser);
@@ -37922,21 +37922,19 @@ cp_parser_omp_clause_affinity (cp_parser *parser, tree list)
return list;
}
}
}
nlist = cp_parser_omp_var_list_no_open (parser, OMP_CLAUSE_AFFINITY,
list, NULL);
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))
OMP_CLAUSE_DECL (c) = build_tree_list (iterators,
OMP_CLAUSE_DECL (c));
}
}
return nlist;
}