[cfe-dev] Bug 17824: parse error in typedef union with -fms-extensions
Jeremy Fitzhardinge
jeremy at goop.org
Fri Nov 22 17:35:36 PST 2013
Hi all,
I filed bug 17824 a few days ago because I'm seeing a regression in the
current svn clang vs previous versions with this structure in glibc's
/usr/include/stdlib.h when compiling with -fms-extensions:
/usr/include/stdlib.h:70:23: error: expected member name or ';' after declaration specifiers
union wait *__uptr;
~~~~~ ^
1 error generated.
The definition in question is:
typedef union
{
union wait *__uptr;
int *__iptr;
} __WAIT_STATUS __attribute__ ((__transparent_union__));
and just trying to compile this on its own is enough to trigger the bug.
The __attribute__ ((__transparent_union__)) is not a part of the
problem; it can be removed without changing the error.
I thought I'd see if I can make some progress on this myself, but I'm
wondering where to start. I'm poking around in
tools/clang/lib/Parse/ParseDecl.cpp seeing if I can make any headway
here, but I'm wondering if there's some way to dump the (partial?) parse
tree or otherwise see how the parser is progressing?
Thanks,
J
More information about the cfe-dev
mailing list