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: PR21391: pruning unused debugging types (c++ bits)


On Tue, May 02, 2006 at 09:20:10AM -0700, Mark Mitchell wrote:
> Aldy Hernandez wrote:
> 
> > +  /* Save casted types in the function's used types hash table.  */
> > +  if (debug_info_level > DINFO_LEVEL_NONE)
> > +    used_types_insert (TREE_TYPE (type), cfun);
> 
> It looks like you're assuming TYPE is a pointer or reference type?  What
> about static_cast<int>(3.0)?   Perhaps these conditionals should have
> POINTER_TYPE_P guards?

You know, I was just thinking about that a few seconds ago.  I was
indeed assuming this.  I'm going to write a helper function
"maybe_used_types_insert" that will take care of this, as well as
abstracting the repetitive "if (debug....) used_types_insert..." business.

I will test and repost.

Aldy


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