[PATCH] Gracefully (and correctly) handle init of multiple union members

Eli Friedman eli.friedman at gmail.com
Wed Sep 25 14:41:26 PDT 2013


On Wed, Sep 25, 2013 at 6:16 AM, Matthew Curtis <mcurtis at codeaurora.org>wrote:

> On 9/24/2013 6:37 PM, Eli Friedman wrote:
>
>> One more thing I didn't catch the first time: please add a test for
>> something like the following:
>>
>> typedef union {
>>   struct {
>>     int zero;
>>     int one;
>>     int two;
>>     int three;
>>   } a;
>>   int b[4];
>> } union_16644_t;
>>
>> union_16644_t x[2] = { [0].a.one = 2, [1].a.zero = 3, [0].a.zero = 5 };
>>
>> -Eli
>>
>>  Test added.
>
> Thanks,
> Matthew Curtis
>
>
LGTM.

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130925/f453c355/attachment.html>


More information about the cfe-commits mailing list