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

Ruben Van Boxem vanboxem.ruben at gmail.com
Wed Mar 2 13:25:28 PST 2011


Hi,

I built LLVM/Clang with MSVC 10.0 and tried to compile a little
program using std::vector.

> In file included from main.cpp:2:
> In file included from C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include/vector:6:
> In file included from C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include/memory:6:
> In file included from C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include/xmemory:6:
> In file included from C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include/cstdlib:13:
> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include/stdlib.h(343) :  error: unknown type name '__unaligned'
> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
>                         ^

A google search shows clang/lib/CodeGen/MicrosoftCXXABI.cpp
knows/should know about __unaligned, or at least this part of Clang
knows about it.

Anything I can do? Thanks!

Ruben




More information about the cfe-dev mailing list