On Sat, Aug 2, 2014 at 11:31 AM, Derek M Jones <derek@xxxxxxxxxxxx> wrote: >> .. and in fact I think even without those things, you can just make >> the unnamed union have a type name, ie >> >> struct S { >> union T { >> int a; >> } >> }; >> >> the union T has a typename, but is a unnamed member of struct S. We >> could use "union T" later. > > > No such luck, not allowed by the C Standard. > > 6.7.2.1p13 > "An unnamed member whose type specifier is a structure specifier with > no tag is called an anonymous structure; an unnamed member whose type > specifier is a union specifier with no tag is called an anonymous union" > > But you can do this sort of thing when the type specifier is not anonymous. That is what I recall as well, not part of stander C. If you enable the "-fplan9-extensions", Linus' example can pass. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html