This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ODR merging and implicit typedefs

> On 05/19/2015 01:33 PM, Jan Hubicka wrote:
> >I tracked down that those are implicit typedef created by create_implicit_typedef.
> >My patch made them no longer anonymous that in turn triggers the bogus diagnostics.
> >I do not think it is fully correct though - those types are not anonymous.
> Hmm?  The types are anonymous:
> static struct
> {
>   int moves_inserted;
>   int copies_inserted;
>   int insns_deleted;
> } stats;
> Here there is a variable named 'stats', but its type has no name.

Ah, sorry. I misread the declaration and thought it produce type stats. I suppose this cost
me an afternoon yesterday :)

Indeed this is anonymous type. I see it is anonymous even though it is not in
any namespace, so it makes sense that I needed to make an exception to my hack
looking for explicit namespace in the DECL_CONTEXT.
> >(I also wonder we we need to introdce a type name "._134") and pass it all the way down
> >to LTO.
> Anonymous types do need to have some name, so that we can mangle
> them. But I don't know if they need to remain past free_lang_data.

I think they can be killed there, as a minor optimization.  I will look into it.
Thanks for the explanation.

> Jason

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]