[cfe-dev] clang build error, error: ISO C++ forbids compound-literals

Leding Li lileding at gmail.com
Mon Oct 18 07:45:48 PDT 2010


Thanks for Sebastian's explain.
But how can I specify the include paths for clang, I just do a
./configure; make under llvm directory.

best wishes
whisper :)



On Mon, Oct 18, 2010 at 5:23 PM, Sebastian Redl
<sebastian.redl at getdesigned.at> wrote:
> On 18.10.2010 11:13, Leding Li wrote:
>> I'm building clang 2.7 on my box, it failed as:
>>
>> llvm[4]: Compiling Lexer.cpp for Release build
>> In file included from
>> /usr/lib/gcc/x86_64-redhat-linux/3.4.5/include/emmintrin.h:34,
>>                   from Lexer.cpp:1108:
>> /usr/lib/gcc/x86_64-redhat-linux/3.4.5/include/xmmintrin.h: In
>> function `float __vector__ _mm_set_ps(float, float, float, float)':
>> /usr/lib/gcc/x86_64-redhat-linux/3.4.5/include/xmmintrin.h:894: error:
>> ISO C++ forbids compound-literals
>> In file included from Lexer.cpp:1108:
>> /usr/lib/gcc/x86_64-redhat-linux/3.4.5/include/emmintrin.h: In
>> function `double __vector__ _mm_set_pd(double, double)':
>> /usr/lib/gcc/x86_64-redhat-linux/3.4.5/include/emmintrin.h:118: error:
>> ISO C++ forbids compound-literals
>> make[4]: *** [/home/work/lileding/pkgsrc/lang/clang/work/llvm-2.7/tools/clang/lib/Lex/Release/Lexer.o]
>> Error 1
>>
>> I've tried both Release and Debug+Assert, all the same.
>> Anyone can help me?
>>
> Your include paths are problematic. Clang provides its own versions of
> the SSE headers and should use those, but apparently on your system the
> GCC ones are preferred.
>
> Sebastian
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>




More information about the cfe-dev mailing list