This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Removed unused cp_binding_level field names_size. (issue4662052)
- From: Gabriel Charette <gchare at google dot com>
- To: reply at codereview dot appspotmail dot com, crowl at google dot com, dnovillo at google dot com, jason at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Jun 2011 14:38:29 -0700
- Subject: Re: Removed unused cp_binding_level field names_size. (issue4662052)
- References: <20110623213241.898C71C375A@gchare.mtv.corp.google.com>
Also:
Tested on x86-64. Ok to commit to trunk?
On Thu, Jun 23, 2011 at 2:32 PM, Gabriel Charette <gchare@google.com> wrote:
> The names_size member of cp_binding_level was write only. Removed it.
> Seems like it was introduced for java in 2002, but it's not used anywhere anymore in the code.
>
> Tested with bootstrap and full regression testing.
>
> 2011-06-23 ?Gabriel Charette ?<gchare@google.com>
>
> ? ? ? ?* name-lookup.h (cp_binding_level): Removed unused
> ? ? ? ?member names_size. Update all users.
>
> diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
> index 953edd5..8bf5f5f 100644
> --- a/gcc/cp/name-lookup.c
> +++ b/gcc/cp/name-lookup.c
> @@ -541,7 +541,6 @@ add_decl_to_level (tree decl, cxx_scope *b)
> ? ? ? ? necessary. ?*/
> ? ? ? TREE_CHAIN (decl) = b->names;
> ? ? ? b->names = decl;
> - ? ? ?b->names_size++;
>
> ? ? ? /* If appropriate, add decl to separate list of statics. ?We
> ? ? ? ? include extern variables because they might turn out to be
> diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
> index 009b5d9..5f266eb 100644
> --- a/gcc/cp/name-lookup.h
> +++ b/gcc/cp/name-lookup.h
> @@ -191,9 +191,6 @@ struct GTY(()) cp_binding_level {
> ? ? ? ?are wrapped in TREE_LISTs; the TREE_VALUE is the OVERLOAD. ?*/
> ? ? tree names;
>
> - ? ?/* Count of elements in names chain. ?*/
> - ? ?size_t names_size;
> -
> ? ? /* A chain of NAMESPACE_DECL nodes. ?*/
> ? ? tree namespaces;
>
>
> --
> This patch is available for review at http://codereview.appspot.com/4662052
>