This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] c-typeck.c: Make some functions static.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 11 Nov 2004 16:53:04 -0500 (EST)
- Subject: [patch] c-typeck.c: Make some functions static.
Hi,
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-11-11 Kazu Hirata <kazu@cs.umass.edu>
* c-typeck.c (c_size_in_bytes, record_maybe_used_decl):
Make them static.
* c-tree.h: Remove the corresponding prototypes.
Index: c-tree.h
===================================================================
RCS file: /home/kazu/nobackup/gcc-cvs/gcc/gcc/c-tree.h,v
retrieving revision 1.186
diff -u -d -p -r1.186 c-tree.h
--- c-tree.h 14 Oct 2004 00:33:59 -0000 1.186
+++ c-tree.h 11 Nov 2004 18:14:41 -0000
@@ -452,7 +452,6 @@ extern struct c_switch *c_switch_stack;
extern tree require_complete_type (tree);
extern int same_translation_unit_p (tree, tree);
extern int comptypes (tree, tree);
-extern tree c_size_in_bytes (tree);
extern bool c_mark_addressable (tree);
extern void c_incomplete_type_error (tree, tree);
extern tree c_type_promotes_to (tree);
@@ -461,7 +460,6 @@ extern tree build_component_ref (tree, t
extern tree build_indirect_ref (tree, const char *);
extern tree build_array_ref (tree, tree);
extern tree build_external_ref (tree, int);
-extern void record_maybe_used_decl (tree);
extern void pop_maybe_used (bool);
extern struct c_expr c_expr_sizeof_expr (struct c_expr);
extern struct c_expr c_expr_sizeof_type (struct c_type_name *);
Index: c-typeck.c
===================================================================
RCS file: /home/kazu/nobackup/gcc-cvs/gcc/gcc/c-typeck.c,v
retrieving revision 1.397
diff -u -d -p -r1.397 c-typeck.c
--- c-typeck.c 7 Nov 2004 00:31:55 -0000 1.397
+++ c-typeck.c 11 Nov 2004 18:14:41 -0000
@@ -111,6 +111,7 @@ static void set_nonincremental_init_from
static tree find_init_member (tree);
static int lvalue_or_else (tree, enum lvalue_use);
static void readonly_error (tree, enum lvalue_use);
+static void record_maybe_used_decl (tree);
/* Do `exp = require_complete_type (exp);' to make sure exp
does not have an incomplete type. (That includes void types.) */
@@ -1126,7 +1127,7 @@ type_lists_compatible_p (tree args1, tre
/* Compute the size to increment a pointer by. */
-tree
+static tree
c_size_in_bytes (tree type)
{
enum tree_code code = TREE_CODE (type);
@@ -1807,7 +1808,7 @@ static struct maybe_used_decl *maybe_use
a VLA type or the operand of typeof is a variably modified
type. */
-void
+static void
record_maybe_used_decl (tree decl)
{
struct maybe_used_decl *t = XOBNEW (&parser_obstack, struct maybe_used_decl);