[cfe-dev] Fwd: Review of transparent_union patch

Anders Johnsen skabet at gmail.com
Mon Jan 26 23:52:54 PST 2009


On Tue, Jan 27, 2009 at 5:21 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Mon, Jan 26, 2009 at 11:45 AM, Anders Johnsen <skabet at gmail.com> wrote:
>>> Something like the following:
>>> struct x {int x; int* y;};
>>> typedef struct x a __attribute((transparent_union));
>>>
>>> This isn't valid, but it looks like your patch accepts it.
>>
>> I just tested this, and it looks like it worked:
>
> Oh, oops, make that "union x".

gcc does't complain. I'm not sure if i should do anything? Where have
you read that it shouldn't allow such things?

>
> -Eli
>

Anders



More information about the cfe-dev mailing list