1

我正在尝试使用 VC11 构建的 Clang 编译一些代码,但我得到以下结果。最好我想启用 SSE4(尽管我真的只是希望我的代码完全编译而不会出现错误),但我尝试过的所有参数都没有改变错误结果。代码没什么特别的,只是一个导出的函数,包括地图和矢量。非常感谢您的任何帮助。

C:\Program Files (x86)\LLVM\vs11\bin\Debug>clang++ -march=corei7 -mavx -mpclmul -msse4 -std=c++11 -c -fms-compatibility -fms-extensions -v -o simple.o simple.cpp 
clang version 3.4 (trunk)
Target: i686-pc-win32
Thread model: posix
 "C:/Program Files (x86)/LLVM/vs11/bin/Debug/clang++.exe" -cc1 -triple i686-pc-win32 -emit-obj -mrelax-all -disable-free -main-file-name simple.cpp -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu corei7 -target-feature +avx -target-feature +pclmul -target-feature +sse4 -v -coverage-file simple.o -resource-dir "C:/Program Files (x86)/LLVM/vs11/bin/Debug\\..\\lib\\clang\\3.4" -internal-isystem "C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include" -internal-isystem "C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\8.0\\\\include" -std=c++11 -fdeprecated-macro -ferror-limit 19 -fmessage-length 150 -mstackrealign -fms-extensions -fms-compatibility -fmsc-version=1300 -fdelayed-template-parsing -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o simple.o -x c++ simple.cpp
clang -cc1 version 3.4 based upon LLVM 3.4svn default target i686-pc-win32
#include "..." search starts here:
#include <...> search starts here:
 C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include
 C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include
 C:\Program Files (x86)\Windows Kits\8.0\\include
End of search list.
In file included from simple.cpp:2:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0:942:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:27:
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\ammintrin.h:28:2: error: "SSE4A instruction set not enabled"
#error "SSE4A instruction set not enabled"
 ^
In file included from simple.cpp:2:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\vector:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xmemory0:942:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:527:20: error: expected unqualified-id
__MACHINEX86(__m64 _m_pshufw(__m64, int))
                   ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\xmmintrin.h:986:19: note: expanded from macro '_m_pshufw'
#define _m_pshufw _mm_shuffle_pi16
                  ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\xmmintrin.h:749:32: note: expanded from macro '_mm_shuffle_pi16'
#define _mm_shuffle_pi16(a, n) __extension__ ({ \
                               ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:582:26: error: expected unqualified-id
__MACHINEX86_X64(__m128i _mm_alignr_epi8(__m128i, __m128i, int))
                         ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\tmmintrin.h:69:34: note: expanded from macro '_mm_alignr_epi8'
#define _mm_alignr_epi8(a, b, n) __extension__ ({ \
                                 ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:583:24: error: expected unqualified-id
__MACHINEX86_X64(__m64 _mm_alignr_pi8(__m64, __m64, int))
                       ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\tmmintrin.h:74:33: note: expanded from macro '_mm_alignr_pi8'
#define _mm_alignr_pi8(a, b, n) __extension__ ({ \
                                ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:592:26: error: expected unqualified-id
__MACHINEX86_X64(__m128i _mm_blend_epi16(__m128i, __m128i, int))
                         ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:110:36: note: expanded from macro '_mm_blend_epi16'
#define _mm_blend_epi16(V1, V2, M) __extension__ ({ \
                                   ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:593:26: error: expected unqualified-id
__MACHINEX86_X64(__m128d _mm_blend_pd(__m128d, __m128d, int))
                         ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:79:33: note: expanded from macro '_mm_blend_pd'
#define _mm_blend_pd(V1, V2, M) __extension__ ({ \
                                ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:594:25: error: expected unqualified-id
__MACHINEX86_X64(__m128 _mm_blend_ps(__m128, __m128, int))
                        ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:84:33: note: expanded from macro '_mm_blend_ps'
#define _mm_blend_ps(V1, V2, M) __extension__ ({ \
                                ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:607:22: error: redefinition of '__builtin_ia32_pcmpestria128' as different
      kind of symbol
__MACHINEX86_X64(int _mm_cmpestra(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:416:6: note: expanded from macro '_mm_cmpestra'
     __builtin_ia32_pcmpestria128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:607:22: note: previous definition is here
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:416:6: note: expanded from macro '_mm_cmpestra'
     __builtin_ia32_pcmpestria128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:607:22: error: expected expression
__MACHINEX86_X64(int _mm_cmpestra(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:416:38: note: expanded from macro '_mm_cmpestra'
     __builtin_ia32_pcmpestria128((A), (LA), (B), (LB), (M))
                                     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:608:22: error: redefinition of '__builtin_ia32_pcmpestric128' as different
      kind of symbol
__MACHINEX86_X64(int _mm_cmpestrc(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:418:6: note: expanded from macro '_mm_cmpestrc'
     __builtin_ia32_pcmpestric128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:608:22: note: previous definition is here
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:418:6: note: expanded from macro '_mm_cmpestrc'
     __builtin_ia32_pcmpestric128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:608:22: error: expected expression
__MACHINEX86_X64(int _mm_cmpestrc(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:418:38: note: expanded from macro '_mm_cmpestrc'
     __builtin_ia32_pcmpestric128((A), (LA), (B), (LB), (M))
                                     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:609:22: error: redefinition of '__builtin_ia32_pcmpestri128' as different kind
      of symbol
__MACHINEX86_X64(int _mm_cmpestri(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:401:6: note: expanded from macro '_mm_cmpestri'
     __builtin_ia32_pcmpestri128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:609:22: note: previous definition is here
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:401:6: note: expanded from macro '_mm_cmpestri'
     __builtin_ia32_pcmpestri128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:609:22: error: expected expression
__MACHINEX86_X64(int _mm_cmpestri(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:401:37: note: expanded from macro '_mm_cmpestri'
     __builtin_ia32_pcmpestri128((A), (LA), (B), (LB), (M))
                                    ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:610:26: error: redefinition of '__builtin_ia32_pcmpestrm128' as different kind
      of symbol
__MACHINEX86_X64(__m128i _mm_cmpestrm(__m128i, int, __m128i, int, int))
                         ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:399:6: note: expanded from macro '_mm_cmpestrm'
     __builtin_ia32_pcmpestrm128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:610:26: note: previous definition is here
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:399:6: note: expanded from macro '_mm_cmpestrm'
     __builtin_ia32_pcmpestrm128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:610:26: error: expected expression
__MACHINEX86_X64(__m128i _mm_cmpestrm(__m128i, int, __m128i, int, int))
                         ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:399:37: note: expanded from macro '_mm_cmpestrm'
     __builtin_ia32_pcmpestrm128((A), (LA), (B), (LB), (M))
                                    ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:611:22: error: redefinition of '__builtin_ia32_pcmpestrio128' as different
      kind of symbol
__MACHINEX86_X64(int _mm_cmpestro(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:420:6: note: expanded from macro '_mm_cmpestro'
     __builtin_ia32_pcmpestrio128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:611:22: note: previous definition is here
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:420:6: note: expanded from macro '_mm_cmpestro'
     __builtin_ia32_pcmpestrio128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:611:22: error: expected expression
__MACHINEX86_X64(int _mm_cmpestro(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:420:38: note: expanded from macro '_mm_cmpestro'
     __builtin_ia32_pcmpestrio128((A), (LA), (B), (LB), (M))
                                     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:612:22: error: redefinition of '__builtin_ia32_pcmpestris128' as different
      kind of symbol
__MACHINEX86_X64(int _mm_cmpestrs(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:422:6: note: expanded from macro '_mm_cmpestrs'
     __builtin_ia32_pcmpestris128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:612:22: note: previous definition is here
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:422:6: note: expanded from macro '_mm_cmpestrs'
     __builtin_ia32_pcmpestris128((A), (LA), (B), (LB), (M))
     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:612:22: error: expected expression
__MACHINEX86_X64(int _mm_cmpestrs(__m128i, int, __m128i, int, int))
                     ^
C:/Program Files (x86)/LLVM/vs11/bin/Debug/../lib/clang/3.4/include\smmintrin.h:422:38: note: expanded from macro '_mm_cmpestrs'
     __builtin_ia32_pcmpestris128((A), (LA), (B), (LB), (M))
                                     ^
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\intrin.h:68:29: note: expanded from macro '__MACHINE'
#define __MACHINE(X)        X;
                            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
4

0 回答 0