[cfe-dev] New C++0x feature support in Clang

Christopher Jefferson chris at bubblescope.net
Sun Jan 30 06:22:16 PST 2011


On 30 Jan 2011, at 13:01, Larry Evans wrote:

> On 01/30/11 06:23, Larry Evans wrote:
>> On 01/30/11 05:25, Christopher Jefferson wrote:
>>> 
>>> On 29 Jan 2011, at 19:13, Larry Evans wrote:
>>> 
>>>> On 01/29/11 05:16, Larry Evans wrote:
>>>>> On 01/26/11 15:45, Douglas Gregor wrote:
>>>>>> Clang has recently gotten much-improved support for the upcoming
>>>>>> C++0x standard.
>> [snip]
>> 
>>>> Just #including iostream causes problems, as shown by
>>>> compile of the following test.cpp:
>>>> 
>>>> #include <iostream>
>>>> int main(void)
>>>> {
>>>>   std::cout<<"Hello World!\n";
>>>>   return 0;
>>>> }
>>> 
>>> The problem you are seeing is that adding -std=c++0x adds a bunch of new g++-specific 
>>> extensions to libstdc++ (the g++ standard library implementation). To make clang work 
>>> on linux these all need supporting (or libc++ needs porting over).
>>> 
>>> Chris
>> 
>> Thanks Chris,
>> 
>> Using the compile option, -U__GXX_EXPERIMENTAL_CXX0X__, seems to
>> workaround the compile problem.  However, I've not tried linking yet.
>> 
>> Larry
> Linking fails with:
> 
> /home/evansl/download/llvm/svn/build/Debug+Asserts/bin/clang -v test.o
> -o test.x

Compile C++ with clang++

Chris



More information about the cfe-dev mailing list