[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [cxx-abi-dev] Mangling of anonymous unions?
- To: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
- Subject: Re: [cxx-abi-dev] Mangling of anonymous unions?
- From: Jason Merrill <jason@xxxxxxxxxx>
- Date: Thu, 19 Dec 2002 02:09:55 -0500
On Wed, 18 Dec 2002 16:38:24 -0800, Mark Mitchell <mark@xxxxxxxxxxxxxxxx> wrote:
> I can never remember if a union has to have any named members. Is:
>
> union { int : 7; };
>
> legal? I think so -- but there's no way to talk about such a thing,
> so I suppose its mangled name doesn't matter, but it would be nice
> if we had one.
We currently warn about it and then throw it away; it doesn't get a symbol
at all.
> This case:
>
> union { union { int i; }; };
>
> is legal, so the name-based approach needs a recursive formulation.
>
> I think that the first name found in a pre-order, depth-first,
> declaration-order walk is a reasonable choice.
Works for me.
Jason
|