public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Removed unused cp_binding_level field names_size. (issue4662052)
@ 2011-06-23 21:35 Gabriel Charette
  2011-06-23 21:48 ` Gabriel Charette
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel Charette @ 2011-06-23 21:35 UTC (permalink / raw)
  To: reply, crowl, dnovillo, jason, gcc-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Removed unused cp_binding_level field names_size. (issue4662052)
  2011-06-23 21:35 Removed unused cp_binding_level field names_size. (issue4662052) Gabriel Charette
@ 2011-06-23 21:48 ` Gabriel Charette
  2011-06-24  2:19   ` Jason Merrill
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel Charette @ 2011-06-23 21:48 UTC (permalink / raw)
  To: reply, crowl, dnovillo, jason, gcc-patches

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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Removed unused cp_binding_level field names_size. (issue4662052)
  2011-06-23 21:48 ` Gabriel Charette
@ 2011-06-24  2:19   ` Jason Merrill
  2011-06-24 13:18     ` Diego Novillo
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Merrill @ 2011-06-24  2:19 UTC (permalink / raw)
  To: Gabriel Charette; +Cc: reply, crowl, dnovillo, gcc-patches

OK.

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Removed unused cp_binding_level field names_size. (issue4662052)
  2011-06-24  2:19   ` Jason Merrill
@ 2011-06-24 13:18     ` Diego Novillo
  0 siblings, 0 replies; 4+ messages in thread
From: Diego Novillo @ 2011-06-24 13:18 UTC (permalink / raw)
  To: Jason Merrill; +Cc: Gabriel Charette, reply, crowl, gcc-patches

On Thu, Jun 23, 2011 at 22:02, Jason Merrill <jason@redhat.com> wrote:
> OK.
>
> Jason

Applied to trunk rev. 175373.


Diego.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-24 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-23 21:35 Removed unused cp_binding_level field names_size. (issue4662052) Gabriel Charette
2011-06-23 21:48 ` Gabriel Charette
2011-06-24  2:19   ` Jason Merrill
2011-06-24 13:18     ` Diego Novillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).