[LLVMbugs] [Bug 13283] New: [Windows] Support microsoft intrinsics

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 6 07:38:17 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13283

             Bug #: 13283
           Summary: [Windows] Support microsoft intrinsics
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: timurrrr at google.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


E.g. _InterlockedDecrement
http://msdn.microsoft.com/en-us/library/windows/desktop/f24ya7ct(v=vs.85).aspx

$ cat interlocked_decrement.c
#include <windows.h>

int main(void) {
  LONG val = 1;
  _InterlockedDecrement(&val);
  return val != 0;
}

$ cl -nologo interlocked_decrement.c && interlocked_decrement.exe && echo "OK"
interlocked_decrement.c
OK

$ clang interlocked_decrement.c
interlocked_decrement.c:5:3: warning: implicit declaration of function
'_InterlockedDecrement' is invalid in C99 [-Wimplicit-function-declaration]
  _InterlockedDecrement(&val);
  ^
1 warning generated.
interlocked_decrement-199938.o : error LNK2019: unresolved external symbol
__InterlockedDecrement referenced in function _main
a.out : fatal error LNK1120: 1 unresolved externals
clang: error: linker command failed with exit code 1120 (use -v to see
invocation)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list