http://llvm.org/bugs/show_bug.cgi?id=9526
Summary: clang++ (2.9 branch) can't deal with GNU libstdc++ 4.6.0 headers Product: clang Version: 2.9 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P Component: C++0x AssignedTo: unassignedclangb...@nondot.org ReportedBy: b...@arklinux.org CC: llvmbugs@cs.uiuc.edu, dgre...@apple.com I didn't have the time to look into this a lot yet, but seeing __is_trivial in the error, I think the problem is caused by gcc's C++0x implementation being further along than clang's. Using libstdc++ 4.6.0, even a simple test app doesn't compile with clang++ anymore: #include <string> results in In file included from test.cpp:1: In file included from /usr/include/c++/4.6.0/string:41: In file included from /usr/include/c++/4.6.0/bits/char_traits.h:40: /usr/include/c++/4.6.0/bits/stl_algobase.h:378:43: error: unexpected type name '_ValueTypeI': expected expression const bool __simple = (__is_trivial(_ValueTypeI) ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:383:40: error: non-type template argument of type 'const bool' is not an integral constant expression return std::__copy_move<_IsMove, __simple, ^~~~~~~~ /usr/include/c++/4.6.0/bits/stl_algobase.h:573:43: error: unexpected type name '_ValueType1': expected expression const bool __simple = (__is_trivial(_ValueType1) ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:578:49: error: non-type template argument of type 'const bool' is not an integral constant expression return std::__copy_move_backward<_IsMove, __simple, ^~~~~~~~ /usr/include/c++/4.6.0/bits/stl_algobase.h:731:32: error: expected ';' in 'for' statement specifier for (__decltype(__n + 0) __niter = __n; ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:731:32: error: use of undeclared identifier '__niter' /usr/include/c++/4.6.0/bits/stl_algobase.h:732:5: error: use of undeclared identifier '__niter' __niter > 0; --__niter, ++__first) ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:732:16: error: expected ')' __niter > 0; --__niter, ++__first) ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:731:11: note: to match this '(' for (__decltype(__n + 0) __niter = __n; ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:732:20: error: use of undeclared identifier '__niter' __niter > 0; --__niter, ++__first) ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:743:32: error: expected ';' in 'for' statement specifier for (__decltype(__n + 0) __niter = __n; ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:743:32: error: use of undeclared identifier '__niter' /usr/include/c++/4.6.0/bits/stl_algobase.h:744:5: error: use of undeclared identifier '__niter' __niter > 0; --__niter, ++__first) ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:744:16: error: expected ')' __niter > 0; --__niter, ++__first) ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:743:11: note: to match this '(' for (__decltype(__n + 0) __niter = __n; ^ /usr/include/c++/4.6.0/bits/stl_algobase.h:744:20: error: use of undeclared identifier '__niter' __niter > 0; --__niter, ++__first) ^ 14 errors generated. -- 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. _______________________________________________ LLVMbugs mailing list LLVMbugs@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs