aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-09-09 09:24:48 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2015-09-09 09:24:48 +0200
commit0bb99c1162085f10cb1706f61774e72b654e5279 (patch)
treefc9692fef1a6b2e989f967181fb2789a4d115a32 /gcc/c
parentfce5e5e35fa397389079203760dd1880fa3edc41 (diff)
downloadgcc-0bb99c1162085f10cb1706f61774e72b654e5279.zip
gcc-0bb99c1162085f10cb1706f61774e72b654e5279.tar.gz
gcc-0bb99c1162085f10cb1706f61774e72b654e5279.tar.bz2
re PR c/67501 (Bad error recovery for invalid OpenMP clauses in C FE)
PR c/67501 * c-parser.c (c_parser_oacc_all_clauses, c_parser_omp_all_clauses): Remove invalid clause from list of clauses even if parser->error is set. * c-c++-common/gomp/pr67501.c: New test. From-SVN: r227578
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog5
-rw-r--r--gcc/c/c-parser.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 141be36..d7eeb2d 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,5 +1,10 @@
2015-09-09 Jakub Jelinek <jakub@redhat.com>
+ PR c/67501
+ * c-parser.c (c_parser_oacc_all_clauses,
+ c_parser_omp_all_clauses): Remove invalid clause from
+ list of clauses even if parser->error is set.
+
PR c/67500
* c-parser.c (c_parser_omp_clause_aligned,
c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 6213fd4..072f94b 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -11752,7 +11752,7 @@ c_parser_oacc_all_clauses (c_parser *parser, omp_clause_mask mask,
first = false;
- if (((mask >> c_kind) & 1) == 0 && !parser->error)
+ if (((mask >> c_kind) & 1) == 0)
{
/* Remove the invalid clause(s) from the list to avoid
confusing the rest of the compiler. */
@@ -11981,7 +11981,7 @@ c_parser_omp_all_clauses (c_parser *parser, omp_clause_mask mask,
first = false;
- if (((mask >> c_kind) & 1) == 0 && !parser->error)
+ if (((mask >> c_kind) & 1) == 0)
{
/* Remove the invalid clause(s) from the list to avoid
confusing the rest of the compiler. */