Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

MS Style Inline Asm failure #19115

Open Quuxplusone opened 10 years ago

Quuxplusone commented 10 years ago
Bugzilla Link PR19116
Status NEW
Importance P normal
Reported by JB Feldman (jb.feldman@kyrus-tech.com)
Reported on 2014-03-12 12:29:24 -0700
Last modified on 2014-03-25 19:52:46 -0700
Version trunk
Hardware PC Windows NT
CC compnerd@compnerd.org, llvm-bugs@lists.llvm.org, rnk@google.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
When compiling with clang-cl, the following code generates an error. This code
compiles without issue in cl.exe, and is adapted (simplified) from MS headers
(ntddk.h).

int main()
{
    __asm    {
    cmp cl, 32
    jc short done
    inc eax
done:
    inc eax
    }
}

sample.c:5:6: error: expected identifier
                jc short done
                   ^
1 error generated.
Quuxplusone commented 10 years ago

I have developed a 4 line patch that just ignores the word "short" in jump statements. I have a feeling this is not the right approach, and therefore will not submit the patch unless others feel it should be added.