https://gcc.gnu.org/g:64cd70e315ed2cf0653cfdde96ae80c3f90a07f4
commit r15-1237-g64cd70e315ed2cf0653cfdde96ae80c3f90a07f4 Author: Andi Kleen <a...@linux.intel.com> Date: Wed Jun 12 09:15:47 2024 -0700 Fix error message 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. Diff: --- gcc/cp/parser.cc | 2 +- gcc/testsuite/g++.dg/cpp1z/constexpr-asm-3.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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());