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: [libcc1] add support for C++


On Sun, 22 Jan 2017, Alexandre Oliva wrote:

> On Jan 13, 2017, Jason Merrill <jason@redhat.com> wrote:
> 
> > On 09/23/2016 08:41 PM, Alexandre Oliva wrote:
> >> +static tree global_friend_list;
> 
> > This should be a hash_set rather than a TREE_LIST.
> 
> You sure?  At least in the libcc1 use scenario, this is going to have a
> single entry.  I didn't even have to make it a list, but I made it one
> because, well, I could :-)  A hash_set seems excessive, unless you
> envision other uses for it.

TREE_LIST should die, so whatever it should be, it shouldn't be a 
TREE_LIST (even if this is one of the cases where TREE_LIST doesn't cause 
efficiency issues).

-- 
Joseph S. Myers
joseph@codesourcery.com


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