diff mbox

Removed unused cp_binding_level field names_size. (issue4662052)

Message ID 20110623213241.898C71C375A@gchare.mtv.corp.google.com
State New
Headers show

Commit Message

Gab Charette June 23, 2011, 9:32 p.m. UTC
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.


--
This patch is available for review at http://codereview.appspot.com/4662052

Comments

Gab Charette June 23, 2011, 9:38 p.m. UTC | #1
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
>
Jason Merrill June 24, 2011, 2:02 a.m. UTC | #2
OK.

Jason
Diego Novillo June 24, 2011, 1:06 p.m. UTC | #3
On Thu, Jun 23, 2011 at 22:02, Jason Merrill <jason@redhat.com> wrote:
> OK.
>
> Jason

Applied to trunk rev. 175373.


Diego.
diff mbox

Patch

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;