From: Pierre-Emmanuel Patry Date: Wed, 9 Apr 2025 15:41:24 +0000 (+0200) Subject: gccrs: Emit error with old asm syntax in new asm blocks X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4894b1e6f2e44afda930322eb4ee487d53242dbc;p=thirdparty%2Fgcc.git gccrs: Emit error with old asm syntax in new asm blocks gcc/rust/ChangeLog: * expand/rust-macro-builtins-asm.cc (parse_asm_arg): Emit error message. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/expand/rust-macro-builtins-asm.cc b/gcc/rust/expand/rust-macro-builtins-asm.cc index 4d026044776..97f7e3cff77 100644 --- a/gcc/rust/expand/rust-macro-builtins-asm.cc +++ b/gcc/rust/expand/rust-macro-builtins-asm.cc @@ -671,6 +671,14 @@ parse_asm_arg (InlineAsmContext inline_asm_ctx) { token = parser.peek_current_token (); + if (token->get_id () == COLON || token->get_id () == SCOPE_RESOLUTION) + { + rust_error_at ( + token->get_locus (), + "the legacy LLVM-style % syntax is no longer supported"); + return tl::unexpected (COMMITTED); + } + // We accept a comma token here. if (token->get_id () != COMMA && inline_asm_ctx.consumed_comma_without_formatted_string)