CLang compiling windows.h from the Windows SDK

You are right. MSVC doesn't allow typedef redefinition after all.
Here is a code simplification of what is happening in windows.h

struct A {
   char a;
   char b;

typedef int foo[1];
typedef int foo[(long)&(((A *)0)->b)];

This looks like an offsetof implementation. We're probably not treating it as a constant expression (but that's another guess), since C/C++ doesn't consider it to be a constant expression (GCC and VC++ have extensions in this area).

Nice testcase; fixed in r110651.


wow I am impressed.. This indeed fix the typedef redefinition issue in
nice job.

I raised Bug 7857 to explain the last issue preventing <Windows.h>
from compiling in C mode.