This is the mail archive of the gcc-patches@gcc.gnu.org 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: [C++ PATCH] Fix cxx_printable_name caching


On 9/24/07, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Sep 24, 2007 at 10:49:24PM +0200, Richard Guenther wrote:
> > On 9/24/07, Jakub Jelinek <jakub@redhat.com> wrote:
> > > I have tried to move decl_ring array to file scope instead and
> > > mark it with GTY((deletable)), but that didn't work, as the old
> > > FUNCTION_DECL in this case is ggc_free'd (during duplicate_decls) rather
> > > than normally garbage collected, so there isn't anything that would set
> > > it to NULL in between the ggc_free call and next cxx_printable_name.
> > > As ggc_free is a promise that such a pointer isn't held anywhere, that is
> > > not a GC bug.
> >
> > It looks like you should be able to get rid of decl_ring completely?
>
> If we don't care about next_decl_uid wraps, yes.  Though, if next_decl_uid
> wraps, we might have bigger problems than that.
> So here is a patch that uses solely uids.

This is ok.  Hmm, looks like I cannot approve it though ;)  So I declare
it obvious.

Thanks,
Richard.

> 2007-09-24  Jakub Jelinek  <jakub@redhat.com>
>
>         * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
>         rather than pointers.


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