https://gcc.gnu.org/g:b94e5ccaa083a39731c99dde55cc8785c45702d2

commit r15-11216-gb94e5ccaa083a39731c99dde55cc8785c45702d2
Author: Yang Kun <[email protected]>
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 <[email protected]>
    (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 21652f423b46..703ca23796c3 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -42761,7 +42761,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,
@@ -42828,7 +42828,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,

Reply via email to