Inline assembly warning gets turned into error #73160
Labels
A-inline-assembly
Area: Inline assembly (`asm!(…)`)
C-bug
Category: This is a bug.
F-asm
`#![feature(asm)]` (not `llvm_asm`)
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Warnings generated by LLVM in inline assembly are reported by
rustc
as errors.For example:
Compile with today's nightly or newer:
rustc +nightly --target x86_64-fortanix-unknown-sgx test.rs
. You'll get these errors:However, when using
clang
, these are reported as warnings. For example:asm("call *(%rax)");
Compile with a recent Clang nightly:
clang-11 -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening -c test.c
. You'll get this warning:Note this issue has nothing to do with SGX/LVI, it's just a convenient way to trigger the assembler warnings.
The text was updated successfully, but these errors were encountered: