[cfe-dev] CLang compiling windows.h from the Windows SDK
Eli Friedman
eli.friedman at gmail.com
Mon Aug 9 20:14:22 PDT 2010
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