On Fri, Aug 31, 2018 at 10:35 AM, Michael Matz <m...@suse.de> wrote:
> Hi,
>
> On Thu, 30 Aug 2018, Nathan Sidwell wrote:
>
>> > struct foo
>> >    {
>> >      unsigned a : 21;
>> >      union x1 { char x; };
>> >      unsigned b : 11;
>> >      union x1 u;
>> >    };
>>
>> (for C++) this happens to be a case we already get right.  <aside> I think
>> that'd be a C vendor extension, I don't think unnamed fields are permitted
>> there?
>
> Anonymous structures and unions are in C11 (and before that a widely
> accepted extension).

This isn't an anonymous union, it's named "x1".  I don't think that
line declares a field in C, either.

Jason

Reply via email to