This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Kill lang_id2
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Apr 2003 13:16:32 -0700
- Subject: Re: [C++ PATCH] Kill lang_id2
- References: <1051731559.735.181.camel@steven>
Steven Bosscher <s.bosscher@student.tudelft.nl> writes:
> Hi,
>
> I don't understand the idea behind lang_id2 in the C++ lang_identifier.
> The total size of the language identifier is 48 bytes, which puts it in
> a 64 byte bucket for the ggc-page. Why not just use the extra 16 bytes
> instead of linking to another tree?
>
> Maybe this was a result of the recent name lookup changes? There is a
> bucket for 44 bytes objects, so if somebody added a field to
> lang_identifier, that would explain.
I'm pretty sure this is historical. The 44-byte bucket is for
10-field rtl nodes, not C++ lang_identifiers.
> Anyway, I'm testing this patch now. It would kill a pointer deref, and
> it should save some memory. OK when it passes bootstrap/regtest?
This is OK. However:
> ! tree implicit_decl;
> ! tree error_locus;
These fields are never used in correct C++ programs -- there is no
such thing as an implicit declaration in C++, and error_locus is for
only complaining about undeclared variables once per function. As a
follow-up, please look into removing these fields entirely. You
should be able to rip out implicit_decl easily; for error_locus, look
at what I did to the analogous code in the C front end.
zw