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)
On Wed, May 03, 2006 at 11:55:41AM -0700, Richard Henderson wrote:
> On Wed, May 03, 2006 at 01:05:10PM -0400, Aldy Hernandez wrote:
> > + if (t && POINTER_TYPE_P (t) && debug_info_level > DINFO_LEVEL_NONE)
> > + used_types_insert (TREE_TYPE (t), cfun);
>
> I don't think this is right. This loses casts to enum,
> for instance. I don't see what pointer-ness really has
> to do with this.
Perhaps:
if (POINTER_TYPE_P (t))
t = TREE_TYPE (t);
...
What we want is to put "struct foo" into the used hash table, not
"struct foo *" in the case where we have a cast to "(struct foo *)".
Would this be acceptable?