[cfe-dev] Clang++/MSVC10 chokes on "__unaligned" in VS header files

Douglas Gregor dgregor at apple.com
Sun Mar 6 11:29:02 PST 2011


On Mar 3, 2011, at 10:59 AM, Ruben Van Boxem wrote:

>> I can explain that. I wrote that code.
>> 
>> Clang doesn't even know anything about the MSVC __unaligned keyword. The
>> __unaligned you saw in there was part of a comment documenting the MSVC
>> name-mangling scheme (which most of that file is dedicated to
>> implementing at the moment). MSVC will mangle __unaligned into the name;
>> but since Clang doesn't support __unaligned yet, Clang doesn't do that
>> just yet. I documented it so I'd remember how to mangle it if and when
>> Clang does support __unaligned.
>>> 
>>> Anything I can do? Thanks!
>> File a bug and write patches. Feel free to implement mangling
>> __unaligned in the Microsoft mangler (everything you need should be in
>> that file).
>> 
>> Chip
> 
> Ah, that's what I thought. I guess this means that Clang is unusable
> with the Windows SDK and its (C/C++ standard) libraries? So that
> limits me to GCC's libstdc++ as the only C++ library usable on Windows
> for CLang at the moment?

That's one of many, many problems that Clang will have when trying to parse Visual Studio headers. Thankfully, people are working on addressing these issues.

For now, if you need a working Clang compiler on Windows, you'll need to use GCC's libstdc++.

	- Doug



More information about the cfe-dev mailing list