[gcc r14-12646] c++, openmp: Fix wrong error messages
Jakub Jelinek
jakub@gcc.gnu.org
Thu Jun 11 00:02:48 GMT 2026
https://gcc.gnu.org/g:d6e40037ed6d9c83487349646ca5d5fa6033afe6
commit r14-12646-gd6e40037ed6d9c83487349646ca5d5fa6033afe6
Author: Yang Kun <yangkun@disroot.org>
Date: Wed Apr 8 15:36:27 2026 +0200
c++, openmp: Fix wrong error messages
Error messages wrongly said "invalid depend kind"
gcc/cp/ChangeLog:
* parser.cc (cp_parser_omp_clause_proc_bind): Fix error message
(cp_parser_omp_clause_device_type): Likewise.
Signed-off-by: Yang Kun <yangkun@disroot.org>
(cherry picked from commit 691ad6ef9e14e2234ff296fd69bf7d324e71d135)
Diff:
---
gcc/cp/parser.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index af2aa85d0051..b2a428b710f8 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -41827,7 +41827,7 @@ cp_parser_omp_clause_proc_bind (cp_parser *parser, tree list,
return c;
invalid_kind:
- cp_parser_error (parser, "invalid depend kind");
+ cp_parser_error (parser, "invalid proc_bind kind");
resync_fail:
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false,
@@ -41877,7 +41877,7 @@ cp_parser_omp_clause_device_type (cp_parser *parser, tree list,
return c;
invalid_kind:
- cp_parser_error (parser, "invalid depend kind");
+ cp_parser_error (parser, "expected %<host%>, %<nohost%> or %<any%>");
resync_fail:
cp_parser_skip_to_closing_parenthesis (parser, /*recovering=*/true,
/*or_comma=*/false,
More information about the Gcc-cvs
mailing list