]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++, openmp: Fix wrong error messages
authorYang Kun <yangkun@disroot.org>
Wed, 8 Apr 2026 13:36:27 +0000 (15:36 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 8 Apr 2026 13:36:27 +0000 (15:36 +0200)
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>
gcc/cp/parser.cc

index b3a241148693024c876f55224ec018cb63512454..01d8f230fb482c48959b5296afd669a88f4ec75f 100644 (file)
@@ -45823,7 +45823,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,
@@ -45890,7 +45890,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,