[cfe-dev] libc++ compilation fails due to _STD expanding to "::std:: "

Ruben Van Boxem vanboxem.ruben at gmail.com
Tue Jun 28 05:13:01 PDT 2011


Hi,

I traced the problem to _STD not getting replaced correctly, in some
places, like line 153 of __locale, where _STD gets expanded to
"::std:: ". I have attached preprocessed output of the CMake command:
> g++.exe -E  -Dcxx_EXPORTS -DNDEBUG -IM:\Development\Source\libc++\include   -nostdinc++ -std=c++0x -fPIC -o algorithm.preprocessed -c M:\Development\Source\libc++\src\algorithm.cpp

you can see the error at line 28459 of the preprocessor output. In
other places where the _LIBCPP_NAMESPACE macro is used, it expands
correctly to "__1" (just search the preprocessed output.

To work around the issue, I can define _STD as "::std::__1" on line
147 of __locale, but that does not fix the problem. I'm using GCC
4.6.1 on Windows x64 building with CMake.

Thanks for any help!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: algorithm_preprocessed.zip
Type: application/zip
Size: 158804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110628/02a699ab/attachment.zip>


More information about the cfe-dev mailing list