[LLVMbugs] [Bug 12534] New: unable to compile simple program with vs2010 headers

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 12 06:26:13 PDT 2012


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

             Bug #: 12534
           Summary: unable to compile simple program with vs2010 headers
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: vanyacpp at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8375
  --> http://llvm.org/bugs/attachment.cgi?id=8375
complete output

The following program:

#include <vector>

Failed to compile with clang: clang++ -c -fms-compatibility -v 1.cpp

The problem is that microsoft headers define _m_pshufw in intrin.h, but clang
define _m_pshufw in xmmintrin.h. So we get name clash. Is there a workaround
for a problem?

In file included from 1.cpp:1:
In file included from c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\vector:6:
In file included from c:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\memory:987:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h:484:26:
error: expected unqualified-id
__MACHINEX86X_IA64(__m64 _m_pshufw(__m64,int))
                         ^
C:/work/cc/build/bin/Debug/../lib/clang/3.1/include\xmmintrin.h:975:19: note:
expanded from macro '_m_pshufw'
#define _m_pshufw _mm_shuffle_pi16
                  ^
C:/work/cc/build/bin/Debug/../lib/clang/3.1/include\xmmintrin.h:738:32: note:
expanded from macro '_mm_shuffle_pi16'
#define _mm_shuffle_pi16(a, n) __extension__ ({ \

-- 
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