This is the mail archive of the gcc-patches@gcc.gnu.org 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 two functions in cp/cxx-pretty-print.c static.


The two functions "pp_cxx_statement" and "pp_cxx_function_definition"
are only used in cp/cxx-pretty-print.c.

The following patch makes them static and removes their prototypes
from cp/cxx-pretty-print.h. A prototype in cp/cxx-pretty-print.c is
only needed for "pp_cxx_statement".

Bootstrapped and regtested.

Ok to apply to mainline?

Regards,
Volker


2005-01-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>

	* cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
	(pp_cxx_function_definition): Make static.
	* cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
	(pp_cxx_function_definition): Likewise.

===================================================================
--- cxx-pretty-print.c	17 Sep 2004 21:54:56 -0000	1.27
+++ cxx-pretty-print.c	24 Jan 2005 15:09:22 -0000
@@ -41,6 +41,7 @@ static void pp_cxx_direct_abstract_decla
 static void pp_cxx_declarator (cxx_pretty_printer *, tree);
 static void pp_cxx_parameter_declaration_clause (cxx_pretty_printer *, tree);
 static void pp_cxx_abstract_declarator (cxx_pretty_printer *, tree);
+static void pp_cxx_statement (cxx_pretty_printer *, tree);
 static void pp_cxx_template_parameter (cxx_pretty_printer *, tree);
 
 
@@ -1302,7 +1303,7 @@ pp_cxx_ctor_initializer (cxx_pretty_prin
       decl-specifier-seq(opt) declarator ctor-initializer(opt) function-body
       decl-specifier-seq(opt) declarator function-try-block  */
 
-void
+static void
 pp_cxx_function_definition (cxx_pretty_printer *pp, tree t)
 {
   tree saved_scope = pp->enclosing_scope;
@@ -1463,7 +1464,7 @@ pp_cxx_exception_declaration (cxx_pretty
 
 /* Statements.  */
 
-void
+static void
 pp_cxx_statement (cxx_pretty_printer *pp, tree t)
 {
   switch (TREE_CODE (t))
===================================================================
--- cxx-pretty-print.h	31 May 2004 15:25:51 -0000	1.8
+++ cxx-pretty-print.h	24 Jan 2005 15:07:52 -0000
@@ -69,9 +69,7 @@ void pp_cxx_colon_colon (cxx_pretty_prin
 void pp_cxx_separate_with (cxx_pretty_printer *, int);
 
 void pp_cxx_declaration (cxx_pretty_printer *, tree);
-void pp_cxx_function_definition (cxx_pretty_printer *, tree);
 void pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree);
-void pp_cxx_statement (cxx_pretty_printer *, tree);
 
 
 #endif /* GCC_CXX_PRETTY_PRINT_H */
===================================================================



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