aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/c/c-parser.cc2
-rw-r--r--gcc/cp/parser.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
index f193329..93da0fb 100644
--- a/gcc/c/c-parser.cc
+++ b/gcc/c/c-parser.cc
@@ -29069,7 +29069,7 @@ c_parser_omp_metadirective (c_parser *parser, bool *if_p)
c_parser_skip_to_end_of_block_or_statement (parser, true);
goto error;
}
- if (!(strcmp (p, "when") == 0 || default_p))
+ if (!default_p && strcmp (p, "when") != 0)
{
error_at (match_loc, "%qs is not valid for %qs",
p, "metadirective");
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index b823a3a..2432281 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -51340,7 +51340,7 @@ cp_parser_omp_metadirective (cp_parser *parser, cp_token *pragma_tok,
cp_parser_skip_to_end_of_block_or_statement (parser, true);
goto fail;
}
- if (!strcmp (p, "when") == 0 && !default_p)
+ if (!default_p && strcmp (p, "when") != 0)
{
error_at (match_loc, "%qs is not valid for %qs",
p, "metadirective");