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

Leding Li lileding at gmail.com
Mon Oct 18 02:13:36 PDT 2010


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?

My box uses RHEL 4.3, gcc 3.4.5.

best wishes
whisper :)



More information about the cfe-dev mailing list