-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
To reproduce
Try compiling the following program:
#![feature(asm)]
fn main() {
unsafe {
asm!("" : : : "whatever");
}
}
Expected result
It should fail with an error
unknown register name ‘whatever’ in ‘asm’
Like how gcc and clang do in inline asm in C.
Actual result
It compiles without an error.
Version info:
> rustc --version --verbose
rustc 1.44.0-nightly (52fa23add 2020-04-18)
binary: rustc
commit-hash: 52fa23add6fb0776b32cc591ac928618391bdf41
commit-date: 2020-04-18
host: x86_64-pc-windows-msvc
release: 1.44.0-nightly
LLVM version: 9.0
Metadata
Metadata
Assignees
Labels
A-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)B-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.