llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.31k stars 11.69k forks source link

[inline asm] _asm not supported - ms compatibilty #30520

Open llvmbot opened 7 years ago

llvmbot commented 7 years ago
Bugzilla Link 31172
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor
CC @rnk

Extended Description

The following code, does not compile in clang, however, it does compile in visual studio (and in icc aswell):

int main(){ _asm {mov eax,ebx} return 0; }

with __asm, it does work.

the error: :2:3: error: use of undeclared identifier '_asm' _asm {mov eax,ebx} ^ 1 error generated. Compiler exited with result code 1

rnk commented 7 years ago

Do you have any sense of how much code in the wild relies on this? I'd rather not break code on Mac with that uses _asm as an identifier with -fasm-blocks.