diff mbox series

[3/3] Fix error message

Message ID 20240612172031.3827584-3-ak@linux.intel.com
State New
Headers show
Series [1/3] Remove const char * support for asm constexpr | expand

Commit Message

Andi Kleen June 12, 2024, 5:20 p.m. UTC
gcc/cp/ChangeLog:

	* parser.cc (cp_parser_asm_string_expression): Use correct error
	message.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1z/constexpr-asm-3.C: Adjust for new message.
---
 gcc/cp/parser.cc                             | 2 +-
 gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index adc4e6fc1aee..01a19080d6c7 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -22863,7 +22863,7 @@  cp_parser_asm_string_expression (cp_parser *parser)
   else if (!cp_parser_is_string_literal (tok))
     {
       error_at (tok->location,
-		"expected string-literal or constexpr in brackets");
+		"expected string-literal or constexpr in parentheses");
       return error_mark_node;
     }
   return cp_parser_string_literal (parser, false, false);
diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C
index ef8a35a0b3ba..0cf8940e109c 100644
--- a/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C
+++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C
@@ -26,7 +26,7 @@  constexpr std::string_view genclobber ()
 void f()
 {
   int a;
-  asm(genfoo () : /* { dg-error "expected string-literal or constexpr in brackets" } */
+  asm(genfoo () : /* { dg-error "expected string-literal or constexpr in parentheses" } */
       genoutput() (a) :
       geninput() (1) :
       genclobber());