This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, committed] Fix two error messages in C++ parser
- From: Volker Reichelt <v dot reichelt at netcologne dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 11 May 2008 22:00:10 +0200 (CEST)
- Subject: [PATCH, committed] Fix two error messages in C++ parser
The patch below fixes two diagnostic glitches in the C++ parser.
In cp_parser_omp_clause_reduction "expected" is missing in an error
message. A couple of lines later in cp_parser_omp_clause_schedule
"expected" is superfluous, since cp_parser_require already prints
"expected".
Bootstrapped and regtested on i686-pc-linux-gnu.
Committed as obvious to mainline, 4.3 branch, and 4.2 branch.
Regards,
Volker
2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
* parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
in error message.
(cp_parser_omp_clause_schedule): Remove superfluous "expected"
in error message.
========================================================================
--- gcc/cp/parser.c 2008-04-19 11:56:00.000000000 +0200
+++ gcc/cp/parser.c 2008-04-20 17:21:11.000000000 +0200
@@ -19814,8 +19814,8 @@ cp_parser_omp_clause_reduction (cp_parse
code = TRUTH_ORIF_EXPR;
break;
default:
- cp_parser_error (parser, "%<+%>, %<*%>, %<-%>, %<&%>, %<^%>, %<|%>, "
- "%<&&%>, or %<||%>");
+ cp_parser_error (parser, "expected %<+%>, %<*%>, %<-%>, %<&%>, %<^%>, "
+ "%<|%>, %<&&%>, or %<||%>");
resync_fail:
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false,
@@ -19846,7 +19846,7 @@ cp_parser_omp_clause_schedule (cp_parser
{
tree c, t;
- if (!cp_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
+ if (!cp_parser_require (parser, CPP_OPEN_PAREN, "%<(%>"))
return list;
c = build_omp_clause (OMP_CLAUSE_SCHEDULE);
========================================================================