Problem with gcc 4.7 C++ headers

Hi;

GCC 4.7 was out today and looks like clang has some problems parsing the new C++ headers, I hit two problems while bootstrapping llvm itself:

In file included from /home/abuild/rpmbuild/BUILD/llvm-3.0/lib/Support/Allocator.cpp:16:
In file included from /home/abuild/rpmbuild/BUILD/llvm-3.0/include/llvm/Support/Recycler.h:18:
In file included from /home/abuild/rpmbuild/BUILD/llvm-3.0/include/llvm/ADT/ilist.h:44:
In file included from /usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/include/c++/4.7/iterator:63:
In file included from /usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/include/c++/4.7/ostream:39:
In file included from /usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/include/c++/4.7/ios:42:
In file included from /usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/include/c++/4.7/bits/ios_base.h:40:
/usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/include/c++/4.7/ext/atomicity.h:48:45: error: use of undeclared identifier ‘__ATOMIC_ACQ_REL’
{ return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }

also

In file included from /home/abuild/rpmbuild/BUILD/llvm-3.0/lib/Support/APSInt.cpp:15:
In file included from /home/abuild/rpmbuild/BUILD/llvm-3.0/include/llvm/ADT/APSInt.h:18:
In file included from /home/abuild/rpmbuild/BUILD/llvm-3.0/include/llvm/ADT/APInt.h:19:
In file included from /home/abuild/rpmbuild/BUILD/llvm-3.0/include/llvm/Support/MathExtras.h:17:
In file included from /home/abuild/rpmbuild/BUILD/llvm-3.0/include/llvm/Support/SwapByteOrder.h:20:
/usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/include/c++/4.7/limits:1404:27: error: use of undeclared identifier ‘__int128’; did you mean ‘__int128_t’?
struct numeric_limits<__int128>

Would be nice to get these fixed/workarounded before 3.1 release.

Regards,
ismail

Please test with trunk...

-Eli

Hi;

Please test with trunk…

SVN trunk r153325 , I see two distinct problems:

/usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/include/c++/4.7/limits:1404:27: error: use of undeclared identifier ‘__int128’; did you mean ‘__int128_t’?
struct numeric_limits<__int128>
^

/usr/lib64/gcc/x86_64-suse-linux/4.7/…/…/…/…/include/c++/4.7/ext/atomicity.h:48:12: error: first argument to atomic operation must be a pointer to _Atomic type (‘volatile _Atomic_word *’ (aka ‘volatile int *’) invalid)
{ return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
^

Regards,
ismail

Still broken with r153943.

Ran into the same road block with Debian on LLVM/Clang trunk after fixing my dev installation.

I figure this will resolve itself sooner, rather than later.

  • Marc