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

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


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

On Mon, Aug 9, 2010 at 11:14 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Mon, Aug 9, 2010 at 7:19 PM, Francois Pichet <pichet2000 at gmail.com> wrote:
>> 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.
>
> Nice testcase; fixed in r110651.
>
> -Eli
>




More information about the cfe-dev mailing list