[cfe-commits] MS anonymous struct patch

Jianjiang Ceng jianjiang.ceng at googlemail.com
Fri Feb 17 06:55:39 PST 2012


Hi all,

please find the attached patch which should fix the problem of parsing
tagged anonymous structs, when ms-extensions is enabled.

The following code can be parsed by the MS C compiler and GCC, but
clang gave an error on couldn't resolve the anonymous struct member
"c".

struct a {
 struct b{
   int c;
 };
};

void foo()
{
  struct a e;
  e.c = 0;
}

This is my first patch submission here, any feedback would be welcome.

Jianjiang Ceng
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anonymous_struct.patch
Type: application/octet-stream
Size: 1440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120217/7fdca488/attachment.obj>


More information about the cfe-commits mailing list