[cfe-dev] CLang compiling windows.h from the Windows SDK

Francois Pichet pichet2000 at gmail.com
Mon Aug 9 19:19:06 PDT 2010


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)];

clang will flag the second typedef as a redefintion. msvc and gcc don't.



On Sun, Aug 8, 2010 at 4:07 PM, Douglas Gregor <dgregor at apple.com> wrote:

>>
>> In C mode there are only 2 kinds of error:
>> 1- MSVC allows typedef redefinition with a different type, CLang doesn't.
>
> What types are involved? This may be a symptom of a different incompatibility  in the type system.
>




More information about the cfe-dev mailing list