[cfe-dev] Build failing when configured with gcc 4.5.0

Douglas Gregor dgregor at apple.com
Sun Jul 25 11:16:30 PDT 2010


On Jul 25, 2010, at 9:52 AM, Clark Gaebel wrote:

> Clang stopped being able to compile iomanip when I configured it with
> gcc 4.5.0's system headers.
> 
> Full usage below:
> 
> clark at clark-server /tmp $ g++ --version
> g++ (Gentoo 4.5.0 p1.2, pie-0.4.5) 4.5.0
> Copyright (C) 2010 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> clark at clark-server /tmp $ clang++ --version
> clang version 1.1 (branches/release_27)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> clark at clark-server /tmp $ cat t.cpp
> #include <iomanip>
> 
> int main()
> {
>        return 0;
> }
> clark at clark-server /tmp $ clang++ t.cpp
> In file included from t.cpp:1:
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iomanip:63:12:
> error: expected expression
>  { return { __mask }; }
> 
> ^                                                                                                                                                

This is not surprising, unfortunately. GCC 4.5.0's headers use various C++0x features---in this case, generalized initializer lists---that Clang does not implement.

	- Doug



More information about the cfe-dev mailing list