diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2025-04-09 17:41:24 +0200 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2025-04-17 18:05:17 +0000 |
commit | 56ccda1142cc2dc3a3e057d81d26d6a641732900 (patch) | |
tree | ffa693425dd55c6ed28b46be671165ab42f130ae /gcc | |
parent | bb01719f0e1665a777b2b475e5feaafd01aa3ac8 (diff) | |
download | gcc-56ccda1142cc2dc3a3e057d81d26d6a641732900.zip gcc-56ccda1142cc2dc3a3e057d81d26d6a641732900.tar.gz gcc-56ccda1142cc2dc3a3e057d81d26d6a641732900.tar.bz2 |
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 <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/expand/rust-macro-builtins-asm.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rust/expand/rust-macro-builtins-asm.cc b/gcc/rust/expand/rust-macro-builtins-asm.cc index 021cd73..96ff0ea 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 %<asm!%> syntax is no longer supported"); + return tl::unexpected<InlineAsmParseError> (COMMITTED); + } + // We accept a comma token here. if (token->get_id () != COMMA && inline_asm_ctx.consumed_comma_without_formatted_string) |