This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libcc1] add support for C++
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 23 Jan 2017 16:44:39 +0000
- Subject: Re: [libcc1] add support for C++
- Authentication-results: sourceware.org; auth=none
- References: <orbmzem8mt.fsf@livre.home> <5e2deb89-1870-9615-266e-b7dcb1f43185@redhat.com> <oro9yy4rvm.fsf@lxoliva.fsfla.org>
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