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: Alexandre Oliva <aoliva at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 28 May 2017 10:45:39 -0300
- Subject: Re: [libcc1] add support for C++
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=aoliva at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4AD7D3D953
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4AD7D3D953
- References: <orbmzem8mt.fsf@livre.home> <5e2deb89-1870-9615-266e-b7dcb1f43185@redhat.com> <oro9yy4rvm.fsf@lxoliva.fsfla.org> <CADzB+2mqJn_ZzMjQ6QqBgSBhae3Jf-8gnYd4r8jDKssAm-F4VQ@mail.gmail.com> <ory3y12tp8.fsf@lxoliva.fsfla.org> <CADzB+2kqxj+9ogJLuht8KKd1keR==dWTExxS4RtQF9=_japk9g@mail.gmail.com> <or7f5k2nq3.fsf@lxoliva.fsfla.org> <CADzB+2=2g1E7KBTHwyWjZ30DZ3HzzQSigcHVnqhYL-ytODt=5w@mail.gmail.com> <orfuk5gskp.fsf@lxoliva.fsfla.org> <CADzB+2n5i6Di35vrG4nStUQSkQ6=xoiAoG3+YTKBFhi+ewtb5A@mail.gmail.com> <orzii8dvt8.fsf@lxoliva.fsfla.org> <CAFiYyc0VHRb6fnbe-fL=PTOxmqvzHTifNZ5NxbL-q1XwTVvfYQ@mail.gmail.com>
On May 26, 2017, Richard Biener <richard.guenther@gmail.com> wrote:
> On Mon, Jan 30, 2017 at 11:31 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
> bool oracle_looked_up;
> that increased lang_identifier size by 8 bytes while there's "plenty" of free
> bits in tree_base (bonus point if you can reap a lang_flag).
Oh, no! I put it there temporarily, very early in the project, because
I couldn't find a better place (I looked for available bits elsewhere,
and I recall I couldn't find any); at the end we moved to a hash_set
(see query_oracle below), that makes a lot more sense since the bit is
only used when libcc1 is in use. But I accidentally left in place the
data member I'd added before, completely unused :-( Ouch!
>> +static inline void
>> +query_oracle (tree name)
>> +{
>> + if (!cp_binding_oracle)
>> + return;
>> +
>> + /* LOOKED_UP holds the set of identifiers that we have already
>> + looked up with the oracle. */
>> + static hash_set<tree> looked_up;
>> + if (looked_up.add (name))
>> + return;
>> +
>> + cp_binding_oracle (CP_ORACLE_IDENTIFIER, name);
>> +}
I apologize for making G++ 7.1 plain waste memory on it.
I'll test and install the obvious fix, trunk and branch, though I might
be a bit slow in getting to it: Richard Stallman will be in town this
week, at my place, and we have a busy schedule, so my computer time and
attention will be severely limited. There's no rush AFAIK, and I'll get
the fix in no later than next weekend, but of course I won't mind at all
if someone else beats me to it.
Thanks for catching this!
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer