This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR21391: pruning unused debugging types (c++ bits)
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Tue, 2 May 2006 12:26:38 -0400
- Subject: Re: PR21391: pruning unused debugging types (c++ bits)
- References: <20060412013606.GA1867@redhat.com> <20060425140502.GA3410@redhat.com> <4452AA0D.1080509@codesourcery.com> <20060502155038.GA21505@redhat.com> <445786BA.1000704@codesourcery.com>
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