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] builtins.c: Make some functions static.


Hi,

Attached is a patch to make some functions static as they are called
only from builtins.c.

Bootstrapped on i686-pc-pc-linux-gnu.  OK to apply?

Kazu Hirata

2004-11-04  Kazu Hirata  <kazu@cs.umass.edu>

	* builtins.c (expand_builtin_return_addr,
	expand_builtin_longjmp, expand_builtin_trap): Make them static.
	* expr.h: Remove the prototypes for expand_builtin_longjmp and
	expand_builtin_trap.
	* tree.h: Remove the prototype for expand_builtin_return_addr.

Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.402
diff -u -d -p -r1.402 builtins.c
--- builtins.c	27 Oct 2004 02:48:24 -0000	1.402
+++ builtins.c	3 Nov 2004 22:06:55 -0000
@@ -452,7 +452,7 @@ builtin_save_expr (tree exp)
    times to get the address of either a higher stack frame, or a return
    address located within it (depending on FNDECL_CODE).  */
 
-rtx
+static rtx
 expand_builtin_return_addr (enum built_in_function fndecl_code, int count,
 			    rtx tem)
 {
@@ -688,7 +688,7 @@ expand_builtin_setjmp (tree arglist, rtx
    scheme in the compiler and will only work in the method used by
    them.  */
 
-void
+static void
 expand_builtin_longjmp (rtx buf_addr, rtx value)
 {
   rtx fp, lab, stack, insn, last;
@@ -4420,7 +4420,7 @@ expand_builtin_expect_jump (tree exp, rt
   return ret;
 }
 
-void
+static void
 expand_builtin_trap (void)
 {
 #ifdef HAVE_trap
Index: expr.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.h,v
retrieving revision 1.174
diff -u -d -p -r1.174 expr.h
--- expr.h	2 Nov 2004 17:59:42 -0000	1.174
+++ expr.h	3 Nov 2004 22:06:59 -0000
@@ -340,9 +340,7 @@ extern void std_expand_builtin_va_start 
 extern rtx default_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
 extern void expand_builtin_setjmp_setup (rtx, rtx);
 extern void expand_builtin_setjmp_receiver (rtx);
-extern void expand_builtin_longjmp (rtx, rtx);
 extern rtx expand_builtin_saveregs (void);
-extern void expand_builtin_trap (void);
 
 /* Functions from expr.c:  */
 
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.643
diff -u -d -p -r1.643 tree.h
--- tree.h	29 Oct 2004 14:05:43 -0000	1.643
+++ tree.h	3 Nov 2004 22:07:03 -0000
@@ -3653,7 +3653,6 @@ extern bool debug_find_tree (tree, tree)
 extern tree unsave_expr_now (tree);
 
 /* In expr.c */
-extern rtx expand_builtin_return_addr (enum built_in_function, int, rtx);
 extern void check_max_integer_computation_mode (tree);
 
 /* In emit-rtl.c */


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