public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Jason Merrill <jason@redhat.com>
Cc: Jan Hubicka <hubicka@ucw.cz>, gcc-patches@gcc.gnu.org
Subject: Re: ODR merging and implicit typedefs
Date: Tue, 19 May 2015 22:17:00 -0000	[thread overview]
Message-ID: <20150519215636.GB93618@kam.mff.cuni.cz> (raw)
In-Reply-To: <555B9320.8060505@redhat.com>

> 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.

Honza
> 
> Jason

  reply	other threads:[~2015-05-19 21:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 17:38 Jan Hubicka
2015-05-19 18:07 ` Markus Trippelsdorf
2015-05-19 21:56 ` Jason Merrill
2015-05-19 22:17   ` Jan Hubicka [this message]
2015-05-20  9:32 ` Eric Botcazou
2015-05-20 14:42   ` Jan Hubicka
2015-05-22  9:31     ` Eric Botcazou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150519215636.GB93618@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).