Is there really only one symbol_ref object referring to each symbolic label?

Zack Weinberg zack@codesourcery.com
Sun Jun 29 06:49:00 GMT 2003


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



More information about the Gcc mailing list