This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is there really only one symbol_ref object referring to eachsymbolic label?
Kazu Hirata <kazu@cs.umass.edu> writes:
> Hi Zack,
>
>> ggc_strdup is a macro wrapper for ggc_alloc_string, and
>> ggc_alloc_string does NOT guarantee the uniqueness of the strings it
>> returns. (However, I consider this a bug in ggc_alloc_string, not in
>> its callers. At one time ggc_alloc_string did uniquize strings - I
>> don't know when that got changed or why.)
>
> I was just playing with ggc_alloc_string and noticed the same. When
> gcc was put into cvs, ggc_alloc_string was in ggc-page.c and looked
> like so. I haven't found any trail of uniquization.
Check the earliest revisions of stringpool.c.
> Should we start using htab_*?
No, it should use hashtable.c.
zw