This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch installed: add prototypes
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Patch installed: add prototypes
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Sat, 5 Feb 2000 22:41:17 -0500 (EST)
I installed this patch to clean up some obvious -Wstrict-prototypes
warnings.
--Kaveh
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ChangeLog,v
retrieving revision 1.5616
diff -u -p -r1.5616 ChangeLog
--- ChangeLog 2000/02/06 03:14:45 1.5616
+++ ChangeLog 2000/02/06 03:36:48
@@ -1,3 +1,44 @@
+2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (c-common.o): Depend on $(EXPR_H).
+
+ * c-common.c: Include expr.h.
+
+ * c-pragma.c (mark_align_stack): Add prototype.
+
+ * caller-save.c (add_stored_regs): Likewise.
+
+ * combine.c (record_promoted_value): Likewise.
+
+ * i386.c (ix86_sched_reorder_pentium, ix86_sched_reorder_ppro):
+ Likewise.
+
+ * cppinit.c (new_pending_define): Likewise.
+
+ * cpplib.c (skip_block_comment, skip_line_comment): Likewise.
+
+ * dwarf2out.c (save_rtx, splice_child_die, reverse_die_lists,
+ AT_class, AT_flag, AT_int, AT_unsigned, AT_string, AT_ref, AT_loc,
+ AT_addr, AT_lbl, get_AT_ref, free_AT, free_die, local_scope_p,
+ class_scope_p): Likewise.
+
+ * dwarf2out.h (dwarf2out_set_demangle_name_func,
+ dwarf2out_add_library_unit_info): Likewise.
+
+ * ggc.h (ggc_page_print_statistics): Likewise.
+
+ * haifa-sched.c (propagate_deps): Likewise.
+
+ * reg-stack.c (next_flags_user, record_label_references): Likewise.
+
+ * rtl.h (set_stack_check_libfunc): Likewise.
+
+ * toplev.h (set_fatal_function): Likewise.
+
+ * toplev.c (set_fatal_function): Delete prototype.
+
+ * diagnostic.c: Deconstify functions returning malloc'ed ptrs.
+
2000-02-05 Geoff Keating <geoffk@cygnus.com>
* ginclude/ppc-asm.h (FUNC_START): Use USER_LABEL_PREFIX.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.378
diff -u -p -r1.378 Makefile.in
--- Makefile.in 2000/02/05 05:41:21 1.378
+++ Makefile.in 2000/02/06 03:36:49
@@ -1408,7 +1408,8 @@ s-under: $(GCC_PASSES)
# A file used by all variants of C.
c-common.o : c-common.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h \
- c-common.h flags.h toplev.h output.h c-pragma.h $(RTL_H) ggc.h
+ c-common.h flags.h toplev.h output.h c-pragma.h $(RTL_H) ggc.h \
+ $(EXPR_H)
# Language-independent files.
Index: c-common.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-common.c,v
retrieving revision 1.91
diff -u -p -r1.91 c-common.c
--- c-common.c 2000/01/31 03:31:26 1.91
+++ c-common.c 2000/02/06 03:36:50
@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */
#include "c-pragma.h"
#include "rtl.h"
#include "ggc.h"
+#include "expr.h"
#include "tm_p.h"
#if USE_CPPLIB
Index: c-pragma.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-pragma.c,v
retrieving revision 1.28
diff -u -p -r1.28 c-pragma.c
--- c-pragma.c 2000/01/25 17:13:14 1.28
+++ c-pragma.c 2000/02/06 03:36:51
@@ -60,6 +60,9 @@ static int default_alignment;
static int push_alignment PARAMS ((int, tree));
static int pop_alignment PARAMS ((tree));
+#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
+static void mark_align_stack PARAMS ((void *));
+#endif
/* Push an alignment value onto the stack. */
static int
Index: caller-save.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/caller-save.c,v
retrieving revision 1.28
diff -u -p -r1.28 caller-save.c
--- caller-save.c 2000/02/05 05:46:57 1.28
+++ caller-save.c 2000/02/06 03:36:51
@@ -93,6 +93,7 @@ static int insert_restore PARAMS ((stru
int));
static struct insn_chain *insert_one_insn PARAMS ((struct insn_chain *, int,
enum insn_code, rtx));
+static void add_stored_regs PARAMS ((rtx, rtx, void *));
/* Initialize for caller-save.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/combine.c,v
retrieving revision 1.113
diff -u -p -r1.113 combine.c
--- combine.c 2000/01/31 22:23:42 1.113
+++ combine.c 2000/02/06 03:36:55
@@ -417,6 +417,7 @@ static void distribute_notes PARAMS ((rt
static void distribute_links PARAMS ((rtx));
static void mark_used_regs_combine PARAMS ((rtx));
static int insn_cuid PARAMS ((rtx));
+static void record_promoted_value PARAMS ((rtx, rtx));
/* Substitute NEWVAL, an rtx expression, into INTO, a place in some
insn. The substitution can be undone by undo_all. If INTO is already
Index: cppinit.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppinit.c,v
retrieving revision 1.33
diff -u -p -r1.33 cppinit.c
--- cppinit.c 2000/01/29 19:00:43 1.33
+++ cppinit.c 2000/02/06 03:36:55
@@ -200,6 +200,7 @@ static void append_include_chain PARAMS
static char *base_name PARAMS ((const char *));
static void dump_special_to_buffer PARAMS ((cpp_reader *, const char *));
static void initialize_dependency_output PARAMS ((cpp_reader *));
+static void new_pending_define PARAMS ((struct cpp_options *, const char *));
/* Last argument to append_include_chain: chain to use */
enum { QUOTE = 0, BRACKET, SYSTEM, AFTER };
Index: cpplib.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cpplib.c,v
retrieving revision 1.102
diff -u -p -r1.102 cpplib.c
--- cpplib.c 2000/02/02 21:41:34 1.102
+++ cpplib.c 2000/02/06 03:36:57
@@ -105,6 +105,8 @@ static void v_cpp_error_with_line PARAMS
static void v_cpp_warning_with_line PARAMS ((cpp_reader *, int, int, const char *, va_list));
static U_CHAR *detect_if_not_defined PARAMS ((cpp_reader *));
static int consider_directive_while_skipping PARAMS ((cpp_reader *, IF_STACK_FRAME *));
+static void skip_block_comment PARAMS ((cpp_reader *));
+static void skip_line_comment PARAMS ((cpp_reader *));
/* Here is the actual list of #-directives.
This table is ordered by frequency of occurrence; the numbers
Index: diagnostic.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/diagnostic.c,v
retrieving revision 1.5
diff -u -p -r1.5 diagnostic.c
--- diagnostic.c 2000/01/28 16:34:00 1.5
+++ diagnostic.c 2000/02/06 03:36:57
@@ -45,16 +45,15 @@ Boston, MA 02111-1307, USA. */
struct output_buffer
{
struct obstack obstack; /* where we build the text to output */
- const char *prefix; /* prefix of every new line */
+ char *prefix; /* prefix of every new line */
int line_length; /* current line length (in characters) */
int max_length; /* maximum characters per line */
};
/* Prototypes. */
static int doing_line_wrapping PARAMS ((void));
-static void init_output_buffer PARAMS ((struct output_buffer*,
- const char *, int));
-static const char *get_output_prefix PARAMS ((const struct output_buffer *));
+static void init_output_buffer PARAMS ((struct output_buffer*, char *, int));
+static char *get_output_prefix PARAMS ((const struct output_buffer *));
static int output_space_left PARAMS ((const struct output_buffer *));
static void emit_output_prefix PARAMS ((struct output_buffer *));
static void output_newline PARAMS ((struct output_buffer *));
@@ -62,10 +61,10 @@ static void output_append PARAMS ((struc
const char *));
static void output_puts PARAMS ((struct output_buffer *, const char *));
static void dump_output PARAMS ((struct output_buffer *, FILE *));
-static const char *vbuild_message_string PARAMS ((const char *, va_list));
-static const char *build_message_string PARAMS ((const char *, ...))
+static char *vbuild_message_string PARAMS ((const char *, va_list));
+static char *build_message_string PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1;
-static const char *build_location_prefix PARAMS ((const char *, int, int));
+static char *build_location_prefix PARAMS ((const char *, int, int));
static void voutput_notice PARAMS ((struct output_buffer *, const char *,
va_list));
static void output_printf PARAMS ((struct output_buffer *, const char *, ...))
@@ -150,7 +149,7 @@ set_message_length (n)
static void
init_output_buffer (buffer, prefix, max_length)
struct output_buffer *buffer;
- const char *prefix;
+ char *prefix;
int max_length;
{
obstack_init (&buffer->obstack);
@@ -161,7 +160,7 @@ init_output_buffer (buffer, prefix, max_
/* Return BUFFER's prefix. */
-static const char *
+static char *
get_output_prefix (buffer)
const struct output_buffer *buffer;
{
@@ -263,16 +262,16 @@ dump_output (buffer, file)
struct output_buffer *buffer;
FILE *file;
{
- const char *text;
+ char *text;
obstack_1grow (&buffer->obstack, '\0');
text = obstack_finish (&buffer->obstack);
fputs (text, file);
- obstack_free (&buffer->obstack, (char *)text);
+ obstack_free (&buffer->obstack, text);
buffer->line_length = 0;
}
-static const char *
+static char *
vbuild_message_string (msgid, ap)
const char *msgid;
va_list ap;
@@ -286,14 +285,14 @@ vbuild_message_string (msgid, ap)
/* Return a malloc'd string containing MSGID formatted a la
printf. The caller is reponsible for freeing the memory. */
-static const char *
+static char *
build_message_string VPARAMS ((const char *msgid, ...))
{
#ifndef ANSI_PROTOTYPES
const char *msgid;
#endif
va_list ap;
- const char *str;
+ char *str;
VA_START (ap, msgid);
@@ -312,7 +311,7 @@ build_message_string VPARAMS ((const cha
/* Return a malloc'd string describing a location. The caller is
responsible for freeing the memory. */
-static const char *
+static char *
build_location_prefix (file, line, warn)
const char *file;
int line;
@@ -342,10 +341,10 @@ voutput_notice (buffer, msgid, ap)
const char *msgid;
va_list ap;
{
- const char *message = vbuild_message_string (msgid, ap);
+ char *message = vbuild_message_string (msgid, ap);
output_puts (buffer, message);
- free ((char *)message);
+ free (message);
}
@@ -392,7 +391,7 @@ line_wrapper_printf VPARAMS ((FILE *file
msgid = va_arg (ap, const char *);
#endif
- init_output_buffer (&buffer, (const char *)NULL, output_maximum_width);
+ init_output_buffer (&buffer, NULL, output_maximum_width);
voutput_notice (&buffer, msgid, ap);
dump_output (&buffer, file);
@@ -1006,7 +1005,7 @@ default_print_error_function (file)
{
if (last_error_function != current_function_decl)
{
- const char *prefix = NULL;
+ char *prefix = NULL;
struct output_buffer buffer;
if (file)
@@ -1056,7 +1055,7 @@ default_print_error_function (file)
if (doing_line_wrapping ())
dump_output (&buffer, stderr);
- free ((char *)prefix);
+ free (prefix);
}
}
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarf2out.c,v
retrieving revision 1.146
diff -u -p -r1.146 dwarf2out.c
--- dwarf2out.c 2000/02/04 23:46:13 1.146
+++ dwarf2out.c 2000/02/06 03:37:00
@@ -2515,6 +2515,9 @@ static void add_incomplete_type PARAMS
static void retry_incomplete_types PARAMS ((void));
static void gen_type_die_for_member PARAMS ((tree, tree, dw_die_ref));
static void gen_abstract_function PARAMS ((tree));
+static rtx save_rtx PARAMS ((rtx));
+static void splice_child_die PARAMS ((dw_die_ref, dw_die_ref));
+static void reverse_die_lists PARAMS ((dw_die_ref));
/* Section names used to hold DWARF debugging information. */
#ifndef DEBUG_INFO_SECTION
@@ -3470,6 +3473,7 @@ add_dwarf_attr (die, attr)
}
}
+static inline dw_val_class AT_class PARAMS ((dw_attr_ref));
static inline dw_val_class
AT_class (a)
dw_attr_ref a;
@@ -3494,6 +3498,7 @@ add_AT_flag (die, attr_kind, flag)
add_dwarf_attr (die, attr);
}
+static inline unsigned AT_flag PARAMS ((dw_attr_ref));
static inline unsigned
AT_flag (a)
register dw_attr_ref a;
@@ -3521,6 +3526,7 @@ add_AT_int (die, attr_kind, int_val)
add_dwarf_attr (die, attr);
}
+static inline long int AT_int PARAMS ((dw_attr_ref));
static inline long int
AT_int (a)
register dw_attr_ref a;
@@ -3548,6 +3554,7 @@ add_AT_unsigned (die, attr_kind, unsigne
add_dwarf_attr (die, attr);
}
+static inline unsigned long AT_unsigned PARAMS ((dw_attr_ref));
static inline unsigned long
AT_unsigned (a)
register dw_attr_ref a;
@@ -3613,6 +3620,7 @@ add_AT_string (die, attr_kind, str)
add_dwarf_attr (die, attr);
}
+static inline const char *AT_string PARAMS ((dw_attr_ref));
static inline const char *
AT_string (a)
register dw_attr_ref a;
@@ -3640,6 +3648,7 @@ add_AT_die_ref (die, attr_kind, targ_die
add_dwarf_attr (die, attr);
}
+static inline dw_die_ref AT_ref PARAMS ((dw_attr_ref));
static inline dw_die_ref
AT_ref (a)
register dw_attr_ref a;
@@ -3684,6 +3693,7 @@ add_AT_loc (die, attr_kind, loc)
add_dwarf_attr (die, attr);
}
+static inline dw_loc_descr_ref AT_loc PARAMS ((dw_attr_ref));
static inline dw_loc_descr_ref
AT_loc (a)
register dw_attr_ref a;
@@ -3711,6 +3721,7 @@ add_AT_addr (die, attr_kind, addr)
add_dwarf_attr (die, attr);
}
+static inline rtx AT_addr PARAMS ((dw_attr_ref));
static inline rtx
AT_addr (a)
register dw_attr_ref a;
@@ -3756,6 +3767,7 @@ add_AT_lbl_offset (die, attr_kind, label
}
+static inline const char *AT_lbl PARAMS ((dw_attr_ref));
static inline const char *
AT_lbl (a)
register dw_attr_ref a;
@@ -3858,6 +3870,7 @@ get_AT_unsigned (die, attr_kind)
return AT_unsigned (a);
}
+static inline dw_die_ref get_AT_ref PARAMS ((dw_die_ref, enum dwarf_attribute));
static inline dw_die_ref
get_AT_ref (die, attr_kind)
dw_die_ref die;
@@ -3886,6 +3899,7 @@ is_fortran ()
/* Free up the memory used by A. */
+static inline void free_AT PARAMS ((dw_attr_ref));
static inline void
free_AT (a)
dw_attr_ref a;
@@ -3932,6 +3946,7 @@ remove_AT (die, attr_kind)
/* Free up the memory used by DIE. */
+static inline void free_die PARAMS ((dw_die_ref));
static inline void
free_die (die)
dw_die_ref die;
@@ -7548,6 +7563,7 @@ scope_die_for (t, context_die)
/* Returns nonzero iff CONTEXT_DIE is internal to a function. */
+static inline int local_scope_p PARAMS ((dw_die_ref));
static inline int
local_scope_p (context_die)
dw_die_ref context_die;
@@ -7561,6 +7577,7 @@ local_scope_p (context_die)
/* Returns nonzero iff CONTEXT_DIE is a class. */
+static inline int class_scope_p PARAMS ((dw_die_ref));
static inline int
class_scope_p (context_die)
dw_die_ref context_die;
@@ -9410,8 +9427,8 @@ gen_decl_die (decl, context_die)
void
dwarf2out_add_library_unit_info (filename, context_list)
- char *filename;
- char *context_list;
+ const char *filename;
+ const char *context_list;
{
unsigned int file_index;
Index: dwarf2out.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarf2out.h,v
retrieving revision 1.5
diff -u -p -r1.5 dwarf2out.h
--- dwarf2out.h 2000/01/14 00:46:57 1.5
+++ dwarf2out.h 2000/02/06 03:37:00
@@ -39,3 +39,5 @@ extern void dwarf2out_frame_finish PARAM
extern void debug_dwarf PARAMS ((void));
struct die_struct;
extern void debug_dwarf_die PARAMS ((struct die_struct *));
+extern void dwarf2out_set_demangle_name_func PARAMS ((const char *(*) (const char *)));
+extern void dwarf2out_add_library_unit_info PARAMS ((const char *, const char *));
Index: ggc.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ggc.h,v
retrieving revision 1.22
diff -u -p -r1.22 ggc.h
--- ggc.h 2000/01/25 10:47:46 1.22
+++ ggc.h 2000/02/06 03:37:00
@@ -205,3 +205,6 @@ size_t ggc_get_size PARAMS ((void *));
/* Used by the various collectors to gather and print statistics that
do not depend on the collector in use. */
void ggc_print_statistics PARAMS ((FILE *, ggc_statistics *));
+
+/* Print allocation statistics. */
+extern void ggc_page_print_statistics PARAMS ((void));
Index: haifa-sched.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/haifa-sched.c,v
retrieving revision 1.140
diff -u -p -r1.140 haifa-sched.c
--- haifa-sched.c 2000/01/28 21:54:39 1.140
+++ haifa-sched.c 2000/02/06 03:37:02
@@ -788,6 +788,7 @@ static rtx group_leader PARAMS ((rtx));
static int set_priorities PARAMS ((int));
static void init_deps PARAMS ((struct deps *));
static void schedule_region PARAMS ((int));
+static void propagate_deps PARAMS ((int, struct deps *, int));
#endif /* INSN_SCHEDULING */
Index: reg-stack.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reg-stack.c,v
retrieving revision 1.54
diff -u -p -r1.54 reg-stack.c
--- reg-stack.c 2000/01/28 22:22:50 1.54
+++ reg-stack.c 2000/02/06 03:37:04
@@ -259,6 +259,8 @@ static int convert_regs_1 PARAMS ((FILE
static int convert_regs_2 PARAMS ((FILE *, basic_block));
static int convert_regs PARAMS ((FILE *));
static void print_stack PARAMS ((FILE *, stack));
+static rtx next_flags_user PARAMS ((rtx));
+static void record_label_references PARAMS ((rtx, rtx));
/* Return non-zero if any stack register is mentioned somewhere within PAT. */
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/rtl.h,v
retrieving revision 1.164
diff -u -p -r1.164 rtl.h
--- rtl.h 2000/01/27 20:46:26 1.164
+++ rtl.h 2000/02/06 03:37:05
@@ -956,6 +956,7 @@ extern int ceil_log2 PARAMS ((unsigned
plus_constant_for_output_wide (X, (HOST_WIDE_INT) (C))
/* In explow.c */
+extern void set_stack_check_libfunc PARAMS ((rtx));
extern HOST_WIDE_INT trunc_int_for_mode PARAMS ((HOST_WIDE_INT,
enum machine_mode));
extern rtx plus_constant_wide PARAMS ((rtx, HOST_WIDE_INT));
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.285
diff -u -p -r1.285 toplev.c
--- toplev.c 2000/02/02 08:15:44 1.285
+++ toplev.c 2000/02/06 03:37:06
@@ -152,7 +152,6 @@ extern tree last_assemble_variable_decl;
static void set_target_switch PARAMS ((const char *));
static const char *decl_name PARAMS ((tree, int));
-extern void set_fatal_function PARAMS ((void (*)(const char *, va_list)));
static void float_signal PARAMS ((int)) ATTRIBUTE_NORETURN;
static void pipe_closed PARAMS ((int)) ATTRIBUTE_NORETURN;
#ifdef ASM_IDENTIFY_LANGUAGE
Index: toplev.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.h,v
retrieving revision 1.32
diff -u -p -r1.32 toplev.h
--- toplev.h 2000/01/17 17:16:19 1.32
+++ toplev.h 2000/02/06 03:37:06
@@ -134,4 +134,6 @@ extern int warningcount;
extern int sorrycount;
extern const char *progname;
+
+extern void set_fatal_function PARAMS ((void (*)(const char *, va_list)));
#endif /* __GCC_TOPLEV_H */
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.133
diff -u -p -r1.133 i386.c
--- i386.c 2000/02/04 21:40:37 1.133
+++ i386.c 2000/02/06 03:37:08
@@ -402,6 +402,8 @@ static HOST_WIDE_INT ix86_compute_frame_
static int ix86_nsaved_regs PARAMS((void));
static void ix86_emit_save_regs PARAMS((void));
static void ix86_emit_epilogue_esp_adjustment PARAMS((int));
+static void ix86_sched_reorder_pentium PARAMS((rtx *, rtx *));
+static void ix86_sched_reorder_ppro PARAMS((rtx *, rtx *));
struct ix86_address
{
@@ -6206,7 +6208,7 @@ ix86_pent_find_pair (e_ready, ready, typ
/* Subroutines of ix86_sched_reorder. */
-void
+static void
ix86_sched_reorder_pentium (ready, e_ready)
rtx *ready;
rtx *e_ready;
@@ -6271,7 +6273,7 @@ ix86_sched_reorder_pentium (ready, e_rea
ix86_reorder_insn (insnp, e_ready - 1);
}
-void
+static void
ix86_sched_reorder_ppro (ready, e_ready)
rtx *ready;
rtx *e_ready;