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: [PATCH, PR63229] fix assert in hash_table pch routines


On Fri, Sep 19, 2014 at 11:23:11AM +0100, Richard Sandiford wrote:
> tsaunders@mozilla.com writes:
> > diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> > index c048672..5b27aa8 100644
> > --- a/gcc/ChangeLog
> > +++ b/gcc/ChangeLog
> > @@ -1,3 +1,8 @@
> > +2014-09-12  Trevor Saunders  <tsaunders@mozilla.com>
> > +
> > +	* hash-table.h (gt_pch_nx): don't call gt_pch_note_object within an
> > +	assert.
> > +
> >  2014-09-12  Joseph Myers  <joseph@codesourcery.com>
> >  
> >  	* target.def (libgcc_floating_mode_supported_p): New hook.
> > diff --git a/gcc/hash-table.h b/gcc/hash-table.h
> > index c2a68fd..028b7de 100644
> > --- a/gcc/hash-table.h
> > +++ b/gcc/hash-table.h
> > @@ -1598,8 +1598,9 @@ template<typename D>
> >  static void
> >  gt_pch_nx (hash_table<D> *h)
> >  {
> > -  gcc_checking_assert (gt_pch_note_object (h->m_entries, h,
> > -					   hashtab_entry_note_pointers<D>));
> > +  bool success ATTRIBUTE_UNUSED
> > +    = gt_pch_note_object (h->m_entries, h, hashtab_entry_note_pointers<D>);
> > +  gcc_checking_assert (success);
> 
> Do we need ATTRIBUTE_UNUSED here?  I thought we tried to define
> gcc_checking_assert so that its argument appeared used even when
> asserts were disabled.

huh, seems so.  I'm about to send more patches touching gc hash tables,
so I'll just fold cleaning this up into them.

Trev

> 
> (Sorry for the nit.)
> 
> Thanks,
> Richard
> 


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