Commit 341a243e by Kaveh R. Ghazi Committed by Kaveh Ghazi

c-pragma.c (handle_pragma_token): Wrap variables `name' and `value' in HANDLE_PRAGMA_WEAK.

       * c-pragma.c (handle_pragma_token): Wrap variables `name' and
       `value' in HANDLE_PRAGMA_WEAK.  Wrap variable `align' in
       HANDLE_PRAGMA_PACK||HANDLE_PRAGMA_PACK_PUSH_POP.

       * genrecog.c (make_insn_sequence): Call memset, not bzero.

       * jump.c (find_insert_position): Don't declare or define unless
       !HAVE_conditional_arithmetic.
       (returnjump_p_1, delete_prior_computation): Add static prototypes.

       * mips-tdump.c (fatal, fancy_abort, main): Add extern prototypes.

       * recog.c (offsettable_address_p): Prototype function pointer.
       (preprocess_constraints): Call memset, not bzero.

       * tree.c (tree_node_kind_names): Constify a char*.  Make static.
       (gcc_obstack_init): Don't declare.
       (fix_sizetype): Add static prototype.
       (gcc_obstack_init): Use prototype casts in call to _obstack_begin.
       (tree_cons): Call memset, not bzero.

       * varasm.c (remove_from_pending_weak_list): Wrap declaration and
       definition in macro ASM_WEAKEN_LABEL.
       (mark_const_hash_entry): Add static prototype.

From-SVN: r29410
parent da09e317
Tue Sep 14 14:14:28 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-pragma.c (handle_pragma_token): Wrap variables `name' and
`value' in HANDLE_PRAGMA_WEAK. Wrap variable `align' in
HANDLE_PRAGMA_PACK||HANDLE_PRAGMA_PACK_PUSH_POP.
* genrecog.c (make_insn_sequence): Call memset, not bzero.
* jump.c (find_insert_position): Don't declare or define unless
!HAVE_conditional_arithmetic.
(returnjump_p_1, delete_prior_computation): Add static prototypes.
* mips-tdump.c (fatal, fancy_abort, main): Add extern prototypes.
* recog.c (offsettable_address_p): Prototype function pointer.
(preprocess_constraints): Call memset, not bzero.
* tree.c (tree_node_kind_names): Constify a char*. Make static.
(gcc_obstack_init): Don't declare.
(fix_sizetype): Add static prototype.
(gcc_obstack_init): Use prototype casts in call to _obstack_begin.
(tree_cons): Call memset, not bzero.
* varasm.c (remove_from_pending_weak_list): Wrap declaration and
definition in macro ASM_WEAKEN_LABEL.
(mark_const_hash_entry): Add static prototype.
Tue Sep 14 12:22:50 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Tue Sep 14 12:22:50 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-lex.c (handle_generic_pragma): Remove unused variable `c'. * c-lex.c (handle_generic_pragma): Remove unused variable `c'.
......
...@@ -235,9 +235,13 @@ handle_pragma_token (string, token) ...@@ -235,9 +235,13 @@ handle_pragma_token (string, token)
{ {
static enum pragma_state state = ps_start; static enum pragma_state state = ps_start;
static enum pragma_state type; static enum pragma_state type;
#ifdef HANDLE_PRAGMA_WEAK
static char * name; static char * name;
static char * value; static char * value;
#endif
#if defined(HANDLE_PRAGMA_PACK) || defined(HANDLE_PRAGMA_PACK_PUSH_POP)
static int align; static int align;
#endif
static tree id; static tree id;
/* If we have reached the end of the #pragma directive then /* If we have reached the end of the #pragma directive then
......
...@@ -225,8 +225,8 @@ make_insn_sequence (insn, type) ...@@ -225,8 +225,8 @@ make_insn_sequence (insn, type)
int new_size; int new_size;
new_size = (insn_name_ptr_size ? insn_name_ptr_size * 2 : 512); new_size = (insn_name_ptr_size ? insn_name_ptr_size * 2 : 512);
insn_name_ptr = xrealloc (insn_name_ptr, sizeof(char *) * new_size); insn_name_ptr = xrealloc (insn_name_ptr, sizeof(char *) * new_size);
bzero (insn_name_ptr + insn_name_ptr_size, memset (insn_name_ptr + insn_name_ptr_size, 0,
sizeof(char *) * (new_size - insn_name_ptr_size)); sizeof(char *) * (new_size - insn_name_ptr_size));
insn_name_ptr_size = new_size; insn_name_ptr_size = new_size;
} }
......
...@@ -124,9 +124,11 @@ static int delete_labelref_insn PROTO((rtx, rtx, int)); ...@@ -124,9 +124,11 @@ static int delete_labelref_insn PROTO((rtx, rtx, int));
static void mark_modified_reg PROTO((rtx, rtx)); static void mark_modified_reg PROTO((rtx, rtx));
static void redirect_tablejump PROTO((rtx, rtx)); static void redirect_tablejump PROTO((rtx, rtx));
static void jump_optimize_1 PROTO ((rtx, int, int, int, int)); static void jump_optimize_1 PROTO ((rtx, int, int, int, int));
#ifndef HAVE_cc0 #if ! defined(HAVE_cc0) && ! defined(HAVE_conditional_arithmetic)
static rtx find_insert_position PROTO((rtx, rtx)); static rtx find_insert_position PROTO((rtx, rtx));
#endif #endif
static int returnjump_p_1 PROTO((rtx *, void *));
static void delete_prior_computation PROTO((rtx, rtx));
/* Main external entry point into the jump optimizer. See comments before /* Main external entry point into the jump optimizer. See comments before
jump_optimize_1 for descriptions of the arguments. */ jump_optimize_1 for descriptions of the arguments. */
...@@ -5450,7 +5452,7 @@ rtx_equal_for_thread_p (x, y, yinsn) ...@@ -5450,7 +5452,7 @@ rtx_equal_for_thread_p (x, y, yinsn)
} }
#ifndef HAVE_cc0 #if !defined(HAVE_cc0) && !defined(HAVE_conditional_arithmetic)
/* Return the insn that NEW can be safely inserted in front of starting at /* Return the insn that NEW can be safely inserted in front of starting at
the jump insn INSN. Return 0 if it is not safe to do this jump the jump insn INSN. Return 0 if it is not safe to do this jump
optimization. Note that NEW must contain a single set. */ optimization. Note that NEW must contain a single set. */
......
...@@ -56,8 +56,10 @@ typedef const PTR_T CPTR_T; ...@@ -56,8 +56,10 @@ typedef const PTR_T CPTR_T;
#define uint unsigned int #define uint unsigned int
#define ulong unsigned long #define ulong unsigned long
void fatal PROTO ((const char *)) ATTRIBUTE_NORETURN;
static void void fancy_abort PROTO ((void)) ATTRIBUTE_NORETURN;
void
fatal(s) fatal(s)
const char *s; const char *s;
{ {
...@@ -1439,6 +1441,8 @@ read_tfile __proto((void)) ...@@ -1439,6 +1441,8 @@ read_tfile __proto((void))
extern int main PROTO ((int, char **));
int int
main (argc, argv) main (argc, argv)
int argc; int argc;
......
...@@ -1828,7 +1828,8 @@ offsettable_address_p (strictp, mode, y) ...@@ -1828,7 +1828,8 @@ offsettable_address_p (strictp, mode, y)
register rtx z; register rtx z;
rtx y1 = y; rtx y1 = y;
rtx *y2; rtx *y2;
int (*addressp) () = (strictp ? strict_memory_address_p : memory_address_p); int (*addressp) PROTO ((enum machine_mode, rtx)) =
(strictp ? strict_memory_address_p : memory_address_p);
if (CONSTANT_ADDRESS_P (y)) if (CONSTANT_ADDRESS_P (y))
return 1; return 1;
...@@ -2062,7 +2063,7 @@ preprocess_constraints () ...@@ -2062,7 +2063,7 @@ preprocess_constraints ()
{ {
int i; int i;
bzero (recog_op_alt, sizeof recog_op_alt); memset (recog_op_alt, 0, sizeof recog_op_alt);
for (i = 0; i < recog_data.n_operands; i++) for (i = 0; i < recog_data.n_operands; i++)
{ {
int j; int j;
......
...@@ -209,7 +209,7 @@ int tree_node_counts[(int)all_kinds]; ...@@ -209,7 +209,7 @@ int tree_node_counts[(int)all_kinds];
int tree_node_sizes[(int)all_kinds]; int tree_node_sizes[(int)all_kinds];
int id_string_size = 0; int id_string_size = 0;
const char *tree_node_kind_names[] = { static const char * const tree_node_kind_names[] = {
"decls", "decls",
"types", "types",
"blocks", "blocks",
...@@ -272,8 +272,7 @@ static void set_type_quals PROTO((tree, int)); ...@@ -272,8 +272,7 @@ static void set_type_quals PROTO((tree, int));
static void append_random_chars PROTO((char *)); static void append_random_chars PROTO((char *));
static void build_real_from_int_cst_1 PROTO((PTR)); static void build_real_from_int_cst_1 PROTO((PTR));
static void mark_type_hash PROTO ((void *)); static void mark_type_hash PROTO ((void *));
static void fix_sizetype PROTO ((tree));
void gcc_obstack_init ();
/* If non-null, a language specific helper for unsave_expr_now. */ /* If non-null, a language specific helper for unsave_expr_now. */
...@@ -332,8 +331,8 @@ gcc_obstack_init (obstack) ...@@ -332,8 +331,8 @@ gcc_obstack_init (obstack)
#define OBSTACK_CHUNK_FREE free #define OBSTACK_CHUNK_FREE free
#endif #endif
_obstack_begin (obstack, OBSTACK_CHUNK_SIZE, 0, _obstack_begin (obstack, OBSTACK_CHUNK_SIZE, 0,
(void *(*) ()) OBSTACK_CHUNK_ALLOC, (void *(*) PROTO ((long))) OBSTACK_CHUNK_ALLOC,
(void (*) ()) OBSTACK_CHUNK_FREE); (void (*) PROTO ((void *))) OBSTACK_CHUNK_FREE);
} }
/* Save all variables describing the current status into the structure /* Save all variables describing the current status into the structure
...@@ -2046,7 +2045,7 @@ tree_cons (purpose, value, chain) ...@@ -2046,7 +2045,7 @@ tree_cons (purpose, value, chain)
else else
{ {
node = (tree) obstack_alloc (current_obstack, sizeof (struct tree_list)); node = (tree) obstack_alloc (current_obstack, sizeof (struct tree_list));
bzero (node, sizeof (struct tree_common)); memset (node, 0, sizeof (struct tree_common));
} }
#ifdef GATHER_STATISTICS #ifdef GATHER_STATISTICS
......
...@@ -177,7 +177,9 @@ static void mark_constants PROTO((rtx)); ...@@ -177,7 +177,9 @@ static void mark_constants PROTO((rtx));
static int output_addressed_constants PROTO((tree)); static int output_addressed_constants PROTO((tree));
static void output_after_function_constants PROTO((void)); static void output_after_function_constants PROTO((void));
static void output_constructor PROTO((tree, int)); static void output_constructor PROTO((tree, int));
#ifdef ASM_WEAKEN_LABEL
static void remove_from_pending_weak_list PROTO ((char *)); static void remove_from_pending_weak_list PROTO ((char *));
#endif
#ifdef ASM_OUTPUT_BSS #ifdef ASM_OUTPUT_BSS
static void asm_output_bss PROTO((FILE *, tree, char *, int, int)); static void asm_output_bss PROTO((FILE *, tree, char *, int, int));
#endif #endif
...@@ -188,6 +190,7 @@ static void asm_output_aligned_bss PROTO((FILE *, tree, char *, int, int)); ...@@ -188,6 +190,7 @@ static void asm_output_aligned_bss PROTO((FILE *, tree, char *, int, int));
#endif /* BSS_SECTION_ASM_OP */ #endif /* BSS_SECTION_ASM_OP */
static void mark_pool_constant PROTO((struct pool_constant *)); static void mark_pool_constant PROTO((struct pool_constant *));
static void mark_pool_sym_hash_table PROTO((struct pool_sym **)); static void mark_pool_sym_hash_table PROTO((struct pool_sym **));
static void mark_const_hash_entry PROTO((void *));
static enum in_section { no_section, in_text, in_data, in_named static enum in_section { no_section, in_text, in_data, in_named
#ifdef BSS_SECTION_ASM_OP #ifdef BSS_SECTION_ASM_OP
...@@ -4445,6 +4448,7 @@ weak_finish () ...@@ -4445,6 +4448,7 @@ weak_finish ()
/* Remove NAME from the pending list of weak symbols. This prevents /* Remove NAME from the pending list of weak symbols. This prevents
the compiler from emitting multiple .weak directives which confuses the compiler from emitting multiple .weak directives which confuses
some assemblers. */ some assemblers. */
#ifdef ASM_WEAKEN_LABEL
static void static void
remove_from_pending_weak_list (name) remove_from_pending_weak_list (name)
char *name ATTRIBUTE_UNUSED; char *name ATTRIBUTE_UNUSED;
...@@ -4461,6 +4465,7 @@ remove_from_pending_weak_list (name) ...@@ -4461,6 +4465,7 @@ remove_from_pending_weak_list (name)
} }
#endif #endif
} }
#endif
void void
assemble_alias (decl, target) assemble_alias (decl, target)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment