From 79c9b7a84f15938037fd209af24bbfa77ae02cbe Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 3 Mar 2017 21:16:58 +0100 Subject: [PATCH] re PR c/79837 (incomplete diagnostic in c-parser: expected +, *, -, &, ^, |, &&, ||, min or identifier) PR c/79837 * c-parser.c (c_parser_omp_clause_reduction): Don't mention % or % in the diagnostics, instead mention identifier. (c_parser_omp_declare_reduction): Don't mention % in the diagnostics. From-SVN: r245885 --- gcc/c/ChangeLog | 6 ++++++ gcc/c/c-parser.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index efee0cf2a87..92be3e13d42 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,5 +1,11 @@ 2017-03-03 Jakub Jelinek + PR c/79837 + * c-parser.c (c_parser_omp_clause_reduction): Don't mention + % or % in the diagnostics, instead mention identifier. + (c_parser_omp_declare_reduction): Don't mention % in the + diagnostics. + PR c/79836 * c-parser.c (c_parser_generic_selection): Use %<_Generic%> instead of %<_Generic>. diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 8636dcc9fb7..fa4e950c94f 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -12112,7 +12112,7 @@ c_parser_omp_clause_reduction (c_parser *parser, tree list) default: c_parser_error (parser, "expected %<+%>, %<*%>, %<-%>, %<&%>, " - "%<^%>, %<|%>, %<&&%>, %<||%>, % or %"); + "%<^%>, %<|%>, %<&&%>, %<||%> or identifier"); c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, 0); return list; } @@ -16960,7 +16960,7 @@ c_parser_omp_declare_reduction (c_parser *parser, enum pragma_context context) default: c_parser_error (parser, "expected %<+%>, %<*%>, %<-%>, %<&%>, " - "%<^%>, %<|%>, %<&&%>, %<||%>, % or identifier"); + "%<^%>, %<|%>, %<&&%>, %<||%> or identifier"); goto fail; } -- 2.30.2