This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Make three functions in cp/name-lookup.c static.

The three functions "print_binding_level", "constructor_name_full",
and "current_decl_namespace" are only used in cp/name-lookup.c.

The following patch makes them static and removes their prototypes
from cp/name-lookup.h. No extra prototypes in cp/name-lookup.c are
needed, since the uses are after the respective definitions.

Bootstrapped and regtested.

Ok to apply to mainline?


2005-01-24  Volker Reichelt  <>

	* name-lookup.c (print_binding_level): Make static.
	(constructor_name_full): Make static inline.
	(current_decl_namespace): Make static.
	* name-lookup.h (constructor_name_full): Remove prototype.
	(print_binding_level): Likewise.
	(current_decl_namespace): Likewise.

--- name-lookup.c	5 Jan 2005 10:02:14 -0000	1.105
+++ name-lookup.c	24 Jan 2005 15:42:53 -0000
@@ -1478,7 +1478,7 @@ getdecls (void)
 static int no_print_functions = 0;
 static int no_print_builtins = 0;
+static void
 print_binding_level (struct cp_binding_level* lvl)
   tree t;
@@ -1656,7 +1656,7 @@ set_identifier_type_value (tree id, tree
    specified class TYPE.  When given a template, this routine doesn't
    lose the specialization.  */
+static inline tree
 constructor_name_full (tree type)
@@ -2821,7 +2821,7 @@ set_decl_namespace (tree decl, tree scop
 /* Return the namespace where the current declaration is declared.  */
+static tree
 current_decl_namespace (void)
   tree result;
--- name-lookup.h	5 Jan 2005 10:02:16 -0000	1.35
+++ name-lookup.h	24 Jan 2005 15:43:53 -0000
@@ -94,7 +94,6 @@ DEF_VEC_GC_O(cxx_saved_binding);
 extern tree identifier_type_value (tree);
 extern void set_identifier_type_value (tree, tree);
 extern void pop_binding (tree, tree);
-extern tree constructor_name_full (tree);
 extern tree constructor_name (tree);
 extern bool constructor_name_p (tree, tree);
@@ -293,7 +292,6 @@ extern bool template_parm_scope_p (void)
 extern scope_kind innermost_scope_kind (void);
 extern cxx_scope *begin_scope (scope_kind, tree);
 extern void print_binding_stack	(void);
-extern void print_binding_level	(cxx_scope *);
 extern void push_to_top_level (void);
 extern void pop_from_top_level (void);
 extern void pop_everything (void);
@@ -329,7 +326,6 @@ extern void push_local_binding (tree, tr
 extern tree getdecls (void);
 extern tree cp_namespace_decls (tree);
 extern void set_decl_namespace (tree, tree, bool);
-extern tree current_decl_namespace (void);
 extern void push_decl_namespace (tree);
 extern void pop_decl_namespace (void);
 extern void do_namespace_alias (tree, tree);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]