Build failing when configured with gcc 4.5.0

Clang stopped being able to compile iomanip when I configured it with
gcc 4.5.0's system headers.

Full usage below:

clark@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@clark-server /tmp $ clang++ --version
clang version 1.1 (branches/release_27)
Target: x86_64-pc-linux-gnu
Thread model: posix
clark@clark-server /tmp $ cat t.cpp
#include <iomanip>

int main()
{
        return 0;
}
clark@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 }; }
          
^

/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iomanip:93:12:
error: expected
expression
  { return { __mask };
}

^

/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iomanip:124:12:
error: expected
expression
  { return { __base };
}

           ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iomanip:162:14:
error: expected
expression
    { return { __c }; }
             ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iomanip:192:12:
error: expected
expression
  { return { __n }; }
           ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iomanip:222:12:
error: expected
expression
  { return { __n }; }
           ^
6 diagnostics
generated.

clark@clark-server /tmp $ uname -a
Linux clark-server 2.6.32-gentoo-r7 #1 SMP Tue Jun 29 12:07:37 EDT 2010
x86_64 AMD Athlon(tm) II X4 620 Processor AuthenticAMD GNU/Linux

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

Thanks.

Any plans on clang getting experimental C++0x support? By looking at the
webpage it seems that the only thing stopping the amazing r-value
references from being used is CodeGen.

Thanks.

Any plans on clang getting experimental C++0x support?

Eventually, yes. But not until C++98 support is solid.

By looking at the
webpage it seems that the only thing stopping the amazing r-value
references from being used is CodeGen.

There is more work to be done there, too. I will fix the web page.