summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-19 08:42:48 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-19 08:42:48 +0000
commit0e93a6acf7c27a197ecbe7754e01f2e6e83d3be4 (patch)
tree63a33d6778d8745de346913c7e48157808cb69e8
parent27bbe39afefbf453508d17605b18df1513bea08d (diff)
downloadppe42-gcc-0e93a6acf7c27a197ecbe7754e01f2e6e83d3be4.tar.gz
ppe42-gcc-0e93a6acf7c27a197ecbe7754e01f2e6e83d3be4.zip
Warning Fixes:
* Makefile.in (print-rtl.o): Depend on bitmap.h. (dbxout.o): Depend on toplev.h. ($(SCHED_PREFIX)sched.o): Likewise. ($(out_object_file)): Likewise for system.h and toplev.h. (cppmain.o): Depend on gansidecl.h. (cpplib.o): Likewise. (cpperror.o): Likewise. (cppexp.o): Likewise. (cpphash.o): Likewise. (cppalloc.o): Likewise. (fix-header.o): Depend on cpplib.h and cpphash.h. (scan-decls.o): Depend on gansidecl.h. * basic-block.h (free_regset_vector): Add prototype. * cccp.c (check_precompiled): Mark parameter `fname' with ATTRIBUTE_UNUSED. (do_assert): Likewise for `op' and `keyword'. (do_unassert): Likewise. (do_line): Likewise for `keyword'. (do_error): Likewise for `op' and `keyword'. (do_warning): Likewise. (do_ident): Likewise for `keyword'. (do_pragma): Likewise for `limit', `op' and `keyword'. (do_sccs): Likewise. (do_if): Likewise for `keyword'. (do_elif): Likewise. (do_else): Likewise. (do_endif): Likewise. * collect2.c (getenv): Remove redundant prototype. (collect_exit, collect_execute, dump_file): Likewise. (dump_list): Wrap prototype and definition in COLLECT_EXPORT_LIST. (dump_prefix_list): Hide prototype and definition. * sparc.c: Include toplev.h. (intreg_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED. (symbolic_memory_operand): Likewise. (sp64_medium_pic_operand): Likewise. (data_segment_operand): Likewise. (text_segment_operand): Likewise. (splittable_symbolic_memory_operand): Likewise. (splittable_immediate_memory_operand): Likewise. (eq_or_neq): Likewise. (normal_comp_operator): Likewise. (noov_compare_op): Likewise. (v9_regcmp_op): Likewise. (v8plus_regcmp_op): Likewise. (extend_op): Likewise. (cc_arithop): Likewise. (cc_arithopn): Likewise. (small_int): Likewise. (uns_small_int): Likewise. (clobbered_register): Likewise. (legitimize_pic_address): Likewise. (delay_operand): Likewise. (sparc_builtin_saveregs): Remove unused variable `stdarg'. * sparc.h (order_regs_for_local_alloc, eligible_for_return_delay, sparc_issue_rate, v8plus_regcmp_p): Add prototypes. * sparc.md (cmpdi_v8plus): Add abort for default case in switch. * cppalloc.c: Include gansidecl.h. * cpperror.c: Include stdarg.h/varargs.h and gansidecl.h. (cpp_file_line_for_message): Mark parameter `pfile' with ATTRIBUTE_UNUSED. (v_cpp_message): New function. (cpp_message): Use it. Also convert to variable arguments. (cpp_fatal): Likewise. (cpp_pfatal_with_name): Constify parameter `name'. * cppexp.c: Move gansidecl.h before cpplib.h. * cpphash.c: Likewise. * cpphash.h (hashf, delete_macro): Add prototypes. * cpplib.c: Include stdarg.h/varargs.h and move gansidecl.h before cpplib.h. Don't include errno.h. (update_path): Add arguments to prototype. (cpp_fatal, cpp_file_line_for_message, cpp_message, delete_macro, cpp_print_containing_files): Remove redundant prototypes. (cpp_hash_cleanup, add_import, append_include_chain, make_assertion, path_include, initialize_builtins, initialize_char_syntax, finclude, validate_else, comp_def_part, lookup_import, redundant_include_p, is_system_include, read_name_map, read_filename_string, open_include_file, check_macro_name, compare_defs, compare_token_lists, eval_if_expression, change_newlines): Add prototype arguments. (hashf): Remove redundant prototype. (read_token_list, free_token_list, safe_read, xcalloc, savestring, conditional_skip, skip_if_group): Add prototype arguments. (fdopen): Remove redundant prototype. (do_define, do_line, do_include, do_undef, do_error, do_pragma, do_ident, do_if, do_xifdef, do_else, do_elif, do_endif, do_sccs, do_once, do_assert, do_unassert, do_warning): Add prototype arguments. (struct directive): Add prototype arguments to function pointer member `func'. (handle_directive): Add missing arguments to call to `do_line'. (do_include): Mark parameters `unused1' and `unused2' with ATTRIBUTE_UNUSED. (do_line): Likewise for `keyword' and new parameters `unused1' and `unused2'. (do_error): Likewise for `keyword'. (do_warning): Likewise. Also add missing argument `pfile' in call to cpp_pedwarn. (do_once): Mark parameter `keyword', `unused1' and `unused2' with ATTRIBUTE_UNUSED. (do_ident): Likewise for `keyword', `buf' and `limit'. (do_pragma): Likewise. Also add missing arguments in call to do_once. (do_sccs): Mark parameter `keyword', `buf' and `limit' with ATTRIBUTE_UNUSED. (do_if): Likewise for `keyword'. (do_elif): Likewise. (eval_if_expression): Likewise for `buf' and `length'. (do_xifdef): Likewise for `unused1' and `unused2'. (do_else): Likewise for `keyword', `buf' and `limit'. (do_endif): Likewise. (parse_name): Add missing argument `pfile' in call to cpp_pedwarn. (cpp_handle_options): Remove superfluous NULL argument in call to cpp_fatal. (cpp_handle_options): Likewise. (do_assert): Mark parameter `keyword', `buf' and `limit' with ATTRIBUTE_UNUSED. (do_unassert): Likewise. (cpp_print_file_and_line): Add missing argument `pfile' in call to cpp_file_line_for_message. (v_cpp_error): New function. (cpp_error): Use it. Also accept variable arguments. (v_cpp_warning): New function. (cpp_warning): Use it. Also accept variable arguments. (cpp_pedwarn): Accept variable arguments. (v_cpp_error_with_line): New function (cpp_error_with_line): Use it. Accept variable arguments. (v_cpp_warning_with_line): New function. (cpp_warning_with_line): Use it. Accept variable arguments. Hide definition. (cpp_pedwarn_with_line): Accept variable arguments. (cpp_pedwarn_with_file_and_line): Likewise. (cpp_error_from_errno): Constify parameter `name'. Add missing argument `pfile' in call to cpp_file_line_for_message. (cpp_perror_with_name): Constify parameter `name'. * cpplib.h: Define PARAMS() in terms of PROTO(). (fatal): Remove redundant prototype. (cpp_error, cpp_warning, cpp_pedwarn, cpp_error_with_line, cpp_pedwarn_with_line, cpp_pedwarn_with_file_and_line, cpp_error_from_errno, cpp_perror_with_name, cpp_pfatal_with_name, cpp_fatal, cpp_message, cpp_pfatal_with_name, cpp_file_line_for_message, cpp_print_containing_files): Add arguments to prototypes. (scan_decls, cpp_finish): Add prototypes. * cppmain.c: Include gansidecl.h. (main): Remove unused variable `i'. * dbxout.c: Include toplev.h. * demangle.h (do_tlink, collect_execute, collect_exit, collect_wait, dump_file, file_exists): Add prototype. * dwarf2out.c (dwarf_type_encoding_name, decl_start_label): Hide prototype and definition. (gen_unspecified_parameters_die): Don't assign results of call to function new_die() to unused variable `parm_die'. (dwarf2out_line): Mark parameter `filename' with ATTRIBUTE_UNUSED. (dwarf2out_define): Likewise for `lineno' and `buffer'. * dwarfout.c (output_unsigned_leb128, output_signed_leb128): Hide prototype and definition. (output_die): Add prototype arguments to function pointer arg. (output_unspecified_parameters_die): Mark parameter `arg' with ATTRIBUTE_UNUSED. * except.c (output_exception_table_entry): Remove unused variable `eh_entry'. * except.h (expand_fixup_region_start, expand_fixup_region_end): Add prototypes. * expr.c (do_jump_by_parts_equality_rtx): Remove prototype. * expr.h (do_jump_by_parts_equality_rtx): Add prototype. * fix-header.c: Include stdarg.h/varargs.h, move gansidecl.h before cpplib.h, include cpphash.h, remove redundant prototype of cpp_fatal, don't define `const', add a prototype for `fatal'. (cpp_file_line_for_message): Add missing arguments `pfile'. (v_cpp_message): New function. (cpp_message): Use it. (v_fatal): New function. (fatal, cpp_fatal): Use it. (cpp_pfatal_with_name): Constify parameter `name'. * flow.c (free_regset_vector): Remove redundant prototype. * function.c (round_down): Wrap prototype and definition with macro ARGS_GROW_DOWNWARD. (record_insns): Wrap prototype and definition with defined (HAVE_prologue) || defined (HAVE_epilogue). * gansidecl.h (ATTRIBUTE_PRINTF_4, ATTRIBUTE_PRINTF_5): New macros. * gen-protos.c: Include gansidecl.h. (hashf): Don't make it static, constify parameter `name'. * genattrtab.c (check_attr_test): Change XEXP() to XSTR() to match specifier %s in calls to function `fatal'. * haifa-sched.c: Include toplev.h. (find_rgns): Remove unused variable `j'. * integrate.c (note_modified_parmregs): Mark parameter `x' with ATTRIBUTE_UNUSED. (mark_stores): Likewise. * jump.c (mark_modified_reg): Likewise. * output.h (insn_current_reference_address): Add prototype. (eh_frame_section): Likewise. * print-rtl.c: Include bitmap.h. * reload1.c (reload): Wrap variables `note' and `next' in macro PRESERVE_DEATH_INFO_REGNO_P. (forget_old_reloads_1): Mark parameter `ignored' with ATTRIBUTE_UNUSED. (choose_reload_regs): Remove unused variable `in'. (reload_cse_invalidate_mem): Mark parameter `ignore' with ATTRIBUTE_UNUSED. (reload_cse_check_clobber): Likewise. * rtl.h (expand_null_return, reg_classes_intersect_p): Add prototype. (mark_elimination): Fix typo in prototype. * scan-decls.c: Include gansidecl.h. * tree.h (using_eh_for_cleanups, supports_one_only): Add prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19867 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog241
-rw-r--r--gcc/Makefile.in27
-rw-r--r--gcc/basic-block.h1
-rw-r--r--gcc/cccp.c42
-rw-r--r--gcc/collect2.c12
-rw-r--r--gcc/config/sparc/sparc.c44
-rw-r--r--gcc/config/sparc/sparc.h4
-rw-r--r--gcc/config/sparc/sparc.md2
-rw-r--r--gcc/cppalloc.c1
-rw-r--r--gcc/cpperror.c68
-rw-r--r--gcc/cppexp.c2
-rw-r--r--gcc/cpphash.c2
-rw-r--r--gcc/cpphash.h2
-rw-r--r--gcc/cpplib.c439
-rw-r--r--gcc/cpplib.h41
-rw-r--r--gcc/cppmain.c2
-rw-r--r--gcc/dbxout.c1
-rw-r--r--gcc/demangle.h18
-rw-r--r--gcc/dwarf2out.c17
-rw-r--r--gcc/dwarfout.c10
-rw-r--r--gcc/except.c1
-rw-r--r--gcc/except.h5
-rw-r--r--gcc/expr.c1
-rw-r--r--gcc/expr.h1
-rw-r--r--gcc/fix-header.c98
-rw-r--r--gcc/flow.c1
-rw-r--r--gcc/function.c8
-rw-r--r--gcc/gansidecl.h2
-rw-r--r--gcc/gen-protos.c5
-rw-r--r--gcc/genattrtab.c8
-rw-r--r--gcc/haifa-sched.c3
-rw-r--r--gcc/integrate.c4
-rw-r--r--gcc/jump.c2
-rw-r--r--gcc/output.h9
-rw-r--r--gcc/print-rtl.c1
-rw-r--r--gcc/reload1.c9
-rw-r--r--gcc/rtl.h4
-rw-r--r--gcc/scan-decls.c1
-rw-r--r--gcc/tree.h2
39 files changed, 850 insertions, 291 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6aa4a846454..2651fb6dd68 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,244 @@
+Tue May 19 11:08:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (print-rtl.o): Depend on bitmap.h.
+ (dbxout.o): Depend on toplev.h.
+ ($(SCHED_PREFIX)sched.o): Likewise.
+ ($(out_object_file)): Likewise for system.h and toplev.h.
+ (cppmain.o): Depend on gansidecl.h.
+ (cpplib.o): Likewise.
+ (cpperror.o): Likewise.
+ (cppexp.o): Likewise.
+ (cpphash.o): Likewise.
+ (cppalloc.o): Likewise.
+ (fix-header.o): Depend on cpplib.h and cpphash.h.
+ (scan-decls.o): Depend on gansidecl.h.
+
+ * basic-block.h (free_regset_vector): Add prototype.
+
+ * cccp.c (check_precompiled): Mark parameter `fname' with
+ ATTRIBUTE_UNUSED.
+ (do_assert): Likewise for `op' and `keyword'.
+ (do_unassert): Likewise.
+ (do_line): Likewise for `keyword'.
+ (do_error): Likewise for `op' and `keyword'.
+ (do_warning): Likewise.
+ (do_ident): Likewise for `keyword'.
+ (do_pragma): Likewise for `limit', `op' and `keyword'.
+ (do_sccs): Likewise.
+ (do_if): Likewise for `keyword'.
+ (do_elif): Likewise.
+ (do_else): Likewise.
+ (do_endif): Likewise.
+
+ * collect2.c (getenv): Remove redundant prototype.
+ (collect_exit, collect_execute, dump_file): Likewise.
+ (dump_list): Wrap prototype and definition in COLLECT_EXPORT_LIST.
+ (dump_prefix_list): Hide prototype and definition.
+
+ * sparc.c: Include toplev.h.
+ (intreg_operand): Mark parameter `mode' with ATTRIBUTE_UNUSED.
+ (symbolic_memory_operand): Likewise.
+ (sp64_medium_pic_operand): Likewise.
+ (data_segment_operand): Likewise.
+ (text_segment_operand): Likewise.
+ (splittable_symbolic_memory_operand): Likewise.
+ (splittable_immediate_memory_operand): Likewise.
+ (eq_or_neq): Likewise.
+ (normal_comp_operator): Likewise.
+ (noov_compare_op): Likewise.
+ (v9_regcmp_op): Likewise.
+ (v8plus_regcmp_op): Likewise.
+ (extend_op): Likewise.
+ (cc_arithop): Likewise.
+ (cc_arithopn): Likewise.
+ (small_int): Likewise.
+ (uns_small_int): Likewise.
+ (clobbered_register): Likewise.
+ (legitimize_pic_address): Likewise.
+ (delay_operand): Likewise.
+ (sparc_builtin_saveregs): Remove unused variable `stdarg'.
+
+ * sparc.h (order_regs_for_local_alloc, eligible_for_return_delay,
+ sparc_issue_rate, v8plus_regcmp_p): Add prototypes.
+
+ * sparc.md (cmpdi_v8plus): Add abort for default case in switch.
+
+ * cppalloc.c: Include gansidecl.h.
+
+ * cpperror.c: Include stdarg.h/varargs.h and gansidecl.h.
+ (cpp_file_line_for_message): Mark parameter `pfile' with
+ ATTRIBUTE_UNUSED.
+ (v_cpp_message): New function.
+ (cpp_message): Use it. Also convert to variable arguments.
+ (cpp_fatal): Likewise.
+ (cpp_pfatal_with_name): Constify parameter `name'.
+
+ * cppexp.c: Move gansidecl.h before cpplib.h.
+ * cpphash.c: Likewise.
+ * cpphash.h (hashf, delete_macro): Add prototypes.
+
+ * cpplib.c: Include stdarg.h/varargs.h and move gansidecl.h before
+ cpplib.h. Don't include errno.h.
+ (update_path): Add arguments to prototype.
+ (cpp_fatal, cpp_file_line_for_message, cpp_message, delete_macro,
+ cpp_print_containing_files): Remove redundant prototypes.
+ (cpp_hash_cleanup, add_import, append_include_chain,
+ make_assertion, path_include, initialize_builtins,
+ initialize_char_syntax, finclude, validate_else, comp_def_part,
+ lookup_import, redundant_include_p, is_system_include,
+ read_name_map, read_filename_string, open_include_file,
+ check_macro_name, compare_defs, compare_token_lists,
+ eval_if_expression, change_newlines): Add prototype arguments.
+ (hashf): Remove redundant prototype.
+ (read_token_list, free_token_list, safe_read, xcalloc, savestring,
+ conditional_skip, skip_if_group): Add prototype arguments.
+ (fdopen): Remove redundant prototype.
+ (do_define, do_line, do_include, do_undef, do_error, do_pragma,
+ do_ident, do_if, do_xifdef, do_else, do_elif, do_endif, do_sccs,
+ do_once, do_assert, do_unassert, do_warning): Add prototype arguments.
+ (struct directive): Add prototype arguments to function pointer
+ member `func'.
+ (handle_directive): Add missing arguments to call to `do_line'.
+ (do_include): Mark parameters `unused1' and `unused2' with
+ ATTRIBUTE_UNUSED.
+ (do_line): Likewise for `keyword' and new parameters `unused1' and
+ `unused2'.
+ (do_error): Likewise for `keyword'.
+ (do_warning): Likewise. Also add missing argument `pfile' in call
+ to cpp_pedwarn.
+ (do_once): Mark parameter `keyword', `unused1' and `unused2' with
+ ATTRIBUTE_UNUSED.
+ (do_ident): Likewise for `keyword', `buf' and `limit'.
+ (do_pragma): Likewise. Also add missing arguments in call to do_once.
+ (do_sccs): Mark parameter `keyword', `buf' and `limit' with
+ ATTRIBUTE_UNUSED.
+ (do_if): Likewise for `keyword'.
+ (do_elif): Likewise.
+ (eval_if_expression): Likewise for `buf' and `length'.
+ (do_xifdef): Likewise for `unused1' and `unused2'.
+ (do_else): Likewise for `keyword', `buf' and `limit'.
+ (do_endif): Likewise.
+ (parse_name): Add missing argument `pfile' in call to cpp_pedwarn.
+ (cpp_handle_options): Remove superfluous NULL argument in call to
+ cpp_fatal.
+ (cpp_handle_options): Likewise.
+ (do_assert): Mark parameter `keyword', `buf' and `limit' with
+ ATTRIBUTE_UNUSED.
+ (do_unassert): Likewise.
+ (cpp_print_file_and_line): Add missing argument `pfile' in call to
+ cpp_file_line_for_message.
+ (v_cpp_error): New function.
+ (cpp_error): Use it. Also accept variable arguments.
+ (v_cpp_warning): New function.
+ (cpp_warning): Use it. Also accept variable arguments.
+ (cpp_pedwarn): Accept variable arguments.
+ (v_cpp_error_with_line): New function
+ (cpp_error_with_line): Use it. Accept variable arguments.
+ (v_cpp_warning_with_line): New function.
+ (cpp_warning_with_line): Use it. Accept variable arguments. Hide
+ definition.
+ (cpp_pedwarn_with_line): Accept variable arguments.
+ (cpp_pedwarn_with_file_and_line): Likewise.
+ (cpp_error_from_errno): Constify parameter `name'. Add missing
+ argument `pfile' in call to cpp_file_line_for_message.
+ (cpp_perror_with_name): Constify parameter `name'.
+
+ * cpplib.h: Define PARAMS() in terms of PROTO().
+ (fatal): Remove redundant prototype.
+ (cpp_error, cpp_warning, cpp_pedwarn, cpp_error_with_line,
+ cpp_pedwarn_with_line, cpp_pedwarn_with_file_and_line,
+ cpp_error_from_errno, cpp_perror_with_name, cpp_pfatal_with_name,
+ cpp_fatal, cpp_message, cpp_pfatal_with_name,
+ cpp_file_line_for_message, cpp_print_containing_files): Add
+ arguments to prototypes.
+ (scan_decls, cpp_finish): Add prototypes.
+
+ * cppmain.c: Include gansidecl.h.
+ (main): Remove unused variable `i'.
+
+ * dbxout.c: Include toplev.h.
+
+ * demangle.h (do_tlink, collect_execute, collect_exit,
+ collect_wait, dump_file, file_exists): Add prototype.
+
+ * dwarf2out.c (dwarf_type_encoding_name, decl_start_label): Hide
+ prototype and definition.
+ (gen_unspecified_parameters_die): Don't assign results of call to
+ function new_die() to unused variable `parm_die'.
+ (dwarf2out_line): Mark parameter `filename' with ATTRIBUTE_UNUSED.
+ (dwarf2out_define): Likewise for `lineno' and `buffer'.
+
+ * dwarfout.c (output_unsigned_leb128, output_signed_leb128): Hide
+ prototype and definition.
+ (output_die): Add prototype arguments to function pointer arg.
+ (output_unspecified_parameters_die): Mark parameter `arg' with
+ ATTRIBUTE_UNUSED.
+
+ * except.c (output_exception_table_entry): Remove unused variable
+ `eh_entry'.
+
+ * except.h (expand_fixup_region_start, expand_fixup_region_end):
+ Add prototypes.
+
+ * expr.c (do_jump_by_parts_equality_rtx): Remove prototype.
+
+ * expr.h (do_jump_by_parts_equality_rtx): Add prototype.
+
+ * fix-header.c: Include stdarg.h/varargs.h, move gansidecl.h
+ before cpplib.h, include cpphash.h, remove redundant prototype of
+ cpp_fatal, don't define `const', add a prototype for `fatal'.
+ (cpp_file_line_for_message): Add missing arguments `pfile'.
+ (v_cpp_message): New function.
+ (cpp_message): Use it.
+ (v_fatal): New function.
+ (fatal, cpp_fatal): Use it.
+ (cpp_pfatal_with_name): Constify parameter `name'.
+
+ * flow.c (free_regset_vector): Remove redundant prototype.
+
+ * function.c (round_down): Wrap prototype and definition with
+ macro ARGS_GROW_DOWNWARD.
+ (record_insns): Wrap prototype and definition with
+ defined (HAVE_prologue) || defined (HAVE_epilogue).
+
+ * gansidecl.h (ATTRIBUTE_PRINTF_4, ATTRIBUTE_PRINTF_5): New macros.
+
+ * gen-protos.c: Include gansidecl.h.
+ (hashf): Don't make it static, constify parameter `name'.
+
+ * genattrtab.c (check_attr_test): Change XEXP() to XSTR() to match
+ specifier %s in calls to function `fatal'.
+
+ * haifa-sched.c: Include toplev.h.
+ (find_rgns): Remove unused variable `j'.
+
+ * integrate.c (note_modified_parmregs): Mark parameter `x' with
+ ATTRIBUTE_UNUSED.
+ (mark_stores): Likewise.
+
+ * jump.c (mark_modified_reg): Likewise.
+
+ * output.h (insn_current_reference_address): Add prototype.
+ (eh_frame_section): Likewise.
+
+ * print-rtl.c: Include bitmap.h.
+
+ * reload1.c (reload): Wrap variables `note' and `next' in macro
+ PRESERVE_DEATH_INFO_REGNO_P.
+ (forget_old_reloads_1): Mark parameter `ignored' with
+ ATTRIBUTE_UNUSED.
+ (choose_reload_regs): Remove unused variable `in'.
+ (reload_cse_invalidate_mem): Mark parameter `ignore' with
+ ATTRIBUTE_UNUSED.
+ (reload_cse_check_clobber): Likewise.
+
+ * rtl.h (expand_null_return, reg_classes_intersect_p): Add prototype.
+ (mark_elimination): Fix typo in prototype.
+
+ * scan-decls.c: Include gansidecl.h.
+
+ * tree.h (using_eh_for_cleanups, supports_one_only): Add prototype.
+
Mon May 18 22:37:33 1998 Jeffrey A Law (law@cygnus.com)
* function.c (identify_blocks): Fix thinko when setting the
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 9422fac7e4d..9cfac12b50e 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1394,7 +1394,7 @@ toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
rtl.o : rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h
-print-rtl.o : print-rtl.c $(CONFIG_H) system.h $(RTL_H)
+print-rtl.o : print-rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h
rtlanal.o : rtlanal.c $(CONFIG_H) system.h $(RTL_H)
varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \
@@ -1421,7 +1421,8 @@ explow.o : explow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
optabs.o : optabs.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
insn-flags.h insn-config.h insn-codes.h expr.h $(RECOG_H) reload.h
dbxout.o : dbxout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h regs.h \
- insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h dbxout.h
+ insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h dbxout.h \
+ toplev.h
sdbout.o : sdbout.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h except.h \
function.h expr.h output.h hard-reg-set.h regs.h defaults.h real.h \
insn-config.h obstack.h xcoffout.h c-pragma.h sdbout.h
@@ -1487,7 +1488,8 @@ regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
insn-codes.h recog.h output.h reload.h regs.h hard-reg-set.h flags.h \
expr.h insn-flags.h
$(SCHED_PREFIX)sched.o : $(SCHED_PREFIX)sched.c $(CONFIG_H) system.h $(RTL_H) \
- $(BASIC_BLOCK_H) regs.h hard-reg-set.h flags.h insn-config.h insn-attr.h
+ $(BASIC_BLOCK_H) regs.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
+ toplev.h
final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h regs.h \
$(RECOG_H) conditions.h insn-config.h insn-attr.h except.h real.h output.h \
hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h \
@@ -1500,7 +1502,7 @@ reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) \
$(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
$(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
- insn-flags.h output.h insn-attr.h insn-codes.h
+ insn-flags.h output.h insn-attr.h insn-codes.h system.h toplev.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(out_file)
# Build auxiliary files that support ecoff format.
@@ -1847,9 +1849,10 @@ cppmain$(exeext): cppmain.o cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o \
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ cppmain.o cpplib.o cpphash.o \
cppalloc.o cpperror.o cppexp.o prefix.o version.o $(LIBS)
-cppmain.o: cppmain.c $(CONFIG_H) cpplib.h system.h
+cppmain.o: cppmain.c $(CONFIG_H) cpplib.h system.h gansidecl.h
-cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status system.h
+cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status system.h \
+ gansidecl.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
@@ -1859,13 +1862,13 @@ cpplib.o: cpplib.c $(CONFIG_H) cpplib.h cpphash.h config.status system.h
-DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
-c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
-cpperror.o: cpperror.c $(CONFIG_H) cpplib.h system.h
+cpperror.o: cpperror.c $(CONFIG_H) cpplib.h system.h gansidecl.h
-cppexp.o: cppexp.c $(CONFIG_H) cpplib.h system.h
+cppexp.o: cppexp.c $(CONFIG_H) cpplib.h system.h gansidecl.h
-cpphash.o: cpphash.c cpplib.h cpphash.h $(CONFIG_H) system.h
+cpphash.o: cpphash.c cpplib.h cpphash.h $(CONFIG_H) system.h gansidecl.h
-cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h system.h
+cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h system.h gansidecl.h
# Note for the stamp targets, we run the program `true' instead of
# having an empty command (nothing following the semicolon).
@@ -2054,10 +2057,10 @@ fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
version.o cppexp.o $(HOST_LIBS)
fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h $(build_xm_file) \
- system.h
+ system.h cpplib.h cpphash.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
-scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file) system.h
+scan-decls.o: scan-decls.c scan.h cpplib.h $(build_xm_file) system.h gansidecl.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
# stmp-fixproto depends on this, not on fix-header directly.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 45789a3f967..d41c9ba5e9e 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -184,6 +184,7 @@ extern void free_int_list PROTO ((int_list_block **));
#define EXIT_BLOCK (-2)
/* from flow.c */
+extern void free_regset_vector PROTO ((regset *, int nelts));
extern int *uid_block_number;
#define BLOCK_NUM(INSN) uid_block_number[INSN_UID (INSN)]
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 91aa331b072..3a0cf0db520 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -5194,7 +5194,7 @@ static char *
check_precompiled (pcf, st, fname, limit)
int pcf;
struct stat *st;
- char *fname;
+ char *fname ATTRIBUTE_UNUSED;
char **limit;
{
int length = 0;
@@ -6190,8 +6190,8 @@ collect_expansion (buf, end, nargs, arglist)
static int
do_assert (buf, limit, op, keyword)
U_CHAR *buf, *limit;
- FILE_BUF *op;
- struct directive *keyword;
+ FILE_BUF *op ATTRIBUTE_UNUSED;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
U_CHAR *bp; /* temp ptr into input buffer */
U_CHAR *symname; /* remember where symbol name starts */
@@ -6267,8 +6267,8 @@ do_assert (buf, limit, op, keyword)
static int
do_unassert (buf, limit, op, keyword)
U_CHAR *buf, *limit;
- FILE_BUF *op;
- struct directive *keyword;
+ FILE_BUF *op ATTRIBUTE_UNUSED;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
U_CHAR *bp; /* temp ptr into input buffer */
U_CHAR *symname; /* remember where symbol name starts */
@@ -6599,7 +6599,7 @@ static int
do_line (buf, limit, op, keyword)
U_CHAR *buf, *limit;
FILE_BUF *op;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
register U_CHAR *bp;
FILE_BUF *ip = &instack[indepth];
@@ -6788,8 +6788,8 @@ do_undef (buf, limit, op, keyword)
static int
do_error (buf, limit, op, keyword)
U_CHAR *buf, *limit;
- FILE_BUF *op;
- struct directive *keyword;
+ FILE_BUF *op ATTRIBUTE_UNUSED;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
int length = limit - buf;
U_CHAR *copy = (U_CHAR *) alloca (length + 1);
@@ -6807,8 +6807,8 @@ do_error (buf, limit, op, keyword)
static int
do_warning (buf, limit, op, keyword)
U_CHAR *buf, *limit;
- FILE_BUF *op;
- struct directive *keyword;
+ FILE_BUF *op ATTRIBUTE_UNUSED;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
int length = limit - buf;
U_CHAR *copy = (U_CHAR *) alloca (length + 1);
@@ -6846,7 +6846,7 @@ static int
do_ident (buf, limit, op, keyword)
U_CHAR *buf, *limit;
FILE_BUF *op;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
FILE_BUF trybuf;
int len;
@@ -6875,9 +6875,9 @@ do_ident (buf, limit, op, keyword)
static int
do_pragma (buf, limit, op, keyword)
- U_CHAR *buf, *limit;
- FILE_BUF *op;
- struct directive *keyword;
+ U_CHAR *buf, *limit ATTRIBUTE_UNUSED;
+ FILE_BUF *op ATTRIBUTE_UNUSED;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
SKIP_WHITE_SPACE (buf);
if (!strncmp ((char *) buf, "once", 4)) {
@@ -6946,9 +6946,9 @@ nope:
static int
do_sccs (buf, limit, op, keyword)
- U_CHAR *buf, *limit;
- FILE_BUF *op;
- struct directive *keyword;
+ U_CHAR *buf ATTRIBUTE_UNUSED, *limit ATTRIBUTE_UNUSED;
+ FILE_BUF *op ATTRIBUTE_UNUSED;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
if (pedantic)
pedwarn ("ANSI C does not allow `#sccs'");
@@ -6972,7 +6972,7 @@ static int
do_if (buf, limit, op, keyword)
U_CHAR *buf, *limit;
FILE_BUF *op;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
HOST_WIDE_INT value;
FILE_BUF *ip = &instack[indepth];
@@ -6989,7 +6989,7 @@ static int
do_elif (buf, limit, op, keyword)
U_CHAR *buf, *limit;
FILE_BUF *op;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
HOST_WIDE_INT value;
FILE_BUF *ip = &instack[indepth];
@@ -7522,7 +7522,7 @@ static int
do_else (buf, limit, op, keyword)
U_CHAR *buf, *limit;
FILE_BUF *op;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
FILE_BUF *ip = &instack[indepth];
@@ -7569,7 +7569,7 @@ static int
do_endif (buf, limit, op, keyword)
U_CHAR *buf, *limit;
FILE_BUF *op;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
{
if (pedantic) {
SKIP_WHITE_SPACE (buf);
diff --git a/gcc/collect2.c b/gcc/collect2.c
index d51a4572b55..eec7a95e10c 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -245,7 +245,6 @@ char * temporary_firstobj;
/* Defined in the automatically-generated underscore.c. */
extern int prepends_underscore;
-extern char *getenv ();
extern char *mktemp ();
extern FILE *fdopen ();
@@ -279,9 +278,6 @@ static struct path_prefix *libpaths[3] = {&cmdline_lib_dirs,
static char *libexts[3] = {"a", "so", NULL}; /* possible library extentions */
#endif
-void collect_exit PROTO((int));
-void collect_execute PROTO((char *, char **, char *));
-void dump_file PROTO((char *));
static void handler PROTO((int));
static int is_ctor_dtor PROTO((char *));
static char *find_a_file PROTO((struct path_prefix *, char *));
@@ -293,8 +289,12 @@ static void fork_execute PROTO((char *, char **));
static void maybe_unlink PROTO((char *));
static void add_to_list PROTO((struct head *, char *));
static void write_list PROTO((FILE *, char *, struct id *));
+#ifdef COLLECT_EXPORT_LIST
static void dump_list PROTO((FILE *, char *, struct id *));
+#endif
+#if 0
static void dump_prefix_list PROTO((FILE *, char *, struct prefix_list *));
+#endif
static void write_list_with_asm PROTO((FILE *, char *, struct id *));
static void write_c_file PROTO((FILE *, char *));
static void scan_prog_file PROTO((char *, enum pass));
@@ -1775,6 +1775,7 @@ is_in_list (prefix, list)
#endif
/* Added for debugging purpose. */
+#ifdef COLLECT_EXPORT_LIST
static void
dump_list (stream, prefix, list)
FILE *stream;
@@ -1787,7 +1788,9 @@ dump_list (stream, prefix, list)
list = list->next;
}
}
+#endif
+#if 0
static void
dump_prefix_list (stream, prefix, list)
FILE *stream;
@@ -1800,6 +1803,7 @@ dump_prefix_list (stream, prefix, list)
list = list->next;
}
}
+#endif
static void
write_list_with_asm (stream, prefix, list)
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 8186f5fa7e8..2270c62a8bc 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA. */
#include "flags.h"
#include "expr.h"
#include "recog.h"
+#include "toplev.h"
/* 1 if the caller has placed an "unimp" insn immediately after the call.
This is used in v8 code when calling a function that returns a structure.
@@ -400,7 +401,7 @@ fp_zero_operand (op)
int
intreg_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (register_operand (op, SImode)
|| (TARGET_ARCH64 && register_operand (op, DImode)));
@@ -520,7 +521,7 @@ symbolic_operand (op, mode)
int
symbolic_memory_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
@@ -551,7 +552,7 @@ label_ref_operand (op, mode)
int
sp64_medium_pic_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
/* Check for (const (minus (symbol_ref:GOT)
(const (minus (label) (pc))))). */
@@ -578,7 +579,7 @@ sp64_medium_pic_operand (op, mode)
int
data_segment_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
@@ -600,7 +601,7 @@ data_segment_operand (op, mode)
int
text_segment_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
@@ -686,7 +687,7 @@ move_operand (op, mode)
int
splittable_symbolic_memory_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) != MEM)
return 0;
@@ -698,7 +699,7 @@ splittable_symbolic_memory_operand (op, mode)
int
splittable_immediate_memory_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) != MEM)
return 0;
@@ -712,7 +713,7 @@ splittable_immediate_memory_operand (op, mode)
int
eq_or_neq (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == EQ || GET_CODE (op) == NE);
}
@@ -723,7 +724,7 @@ eq_or_neq (op, mode)
int
normal_comp_operator (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
enum rtx_code code = GET_CODE (op);
@@ -743,7 +744,7 @@ normal_comp_operator (op, mode)
int
noov_compare_op (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
enum rtx_code code = GET_CODE (op);
@@ -762,7 +763,7 @@ noov_compare_op (op, mode)
int
v9_regcmp_op (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
enum rtx_code code = GET_CODE (op);
@@ -775,7 +776,7 @@ v9_regcmp_op (op, mode)
int
v8plus_regcmp_op (op, mode)
register rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
enum rtx_code code = GET_CODE (op);
@@ -787,7 +788,7 @@ v8plus_regcmp_op (op, mode)
int
extend_op (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return GET_CODE (op) == SIGN_EXTEND || GET_CODE (op) == ZERO_EXTEND;
}
@@ -799,7 +800,7 @@ extend_op (op, mode)
int
cc_arithop (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) == AND
|| GET_CODE (op) == IOR
@@ -815,7 +816,7 @@ cc_arithop (op, mode)
int
cc_arithopn (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
/* XOR is not here because combine canonicalizes (xor (not ...) ...)
and (xor ... (not ...)) to (not (xor ...)). */
@@ -947,7 +948,7 @@ arith10_double_operand (op, mode)
int
small_int (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == CONST_INT && SMALL_INT (op));
}
@@ -959,7 +960,7 @@ small_int (op, mode)
int
uns_small_int (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
#if HOST_BITS_PER_WIDE_INT > 32
/* All allowed constants will fit a CONST_INT. */
@@ -986,7 +987,7 @@ uns_arith_operand (op, mode)
int
clobbered_register (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
return (GET_CODE (op) == REG && call_used_regs[REGNO (op)]);
}
@@ -1433,7 +1434,7 @@ pic_address_needs_scratch (x)
rtx
legitimize_pic_address (orig, mode, reg)
rtx orig;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
rtx reg;
{
if (GET_CODE (orig) == SYMBOL_REF)
@@ -4669,9 +4670,6 @@ sparc_builtin_saveregs (arglist)
tree arglist;
{
tree fntype = TREE_TYPE (current_function_decl);
- int stdarg = (TYPE_ARG_TYPES (fntype) != 0
- && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
- != void_type_node));
int first_reg = current_function_args_info.words;
rtx address;
int regno;
@@ -6801,7 +6799,7 @@ sparc_return_peephole_ok (dest, src)
int
delay_operand (op, mode)
rtx op;
- enum machine_mode mode;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index fea8e9205f1..2add5214ec9 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -3207,6 +3207,7 @@ extern char *singlemove_string ();
extern void emit_v9_brxx_insn ();
extern void finalize_pic ();
+extern void order_regs_for_local_alloc ();
extern void output_double_int ();
extern void output_function_epilogue ();
extern void output_function_prologue ();
@@ -3228,6 +3229,7 @@ extern int check_pic ();
extern int compute_frame_size ();
extern int data_segment_operand ();
extern int eligible_for_epilogue_delay ();
+extern int eligible_for_return_delay ();
extern int emit_move_sequence ();
extern int extend_op ();
extern int fcc_reg_operand ();
@@ -3249,6 +3251,7 @@ extern int small_int ();
extern int sp64_medium_pic_operand ();
extern int sparc_flat_eligible_for_epilogue_delay ();
extern int sparc_flat_epilogue_delay_slots ();
+extern int sparc_issue_rate ();
extern int sparc_operand ();
extern int splittable_immediate_memory_operand ();
extern int splittable_symbolic_memory_operand ();
@@ -3258,6 +3261,7 @@ extern int symbolic_operand ();
extern int text_segment_operand ();
extern int ultrasparc_adjust_cost ();
extern int uns_small_int ();
+extern int v8plus_regcmp_p ();
extern int v9_regcmp_op ();
extern int v9_regcmp_p ();
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 64cc6bcac9e..683bcfd55f8 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -567,6 +567,8 @@
if (sparc_check_64 (operands[1], insn) <= 0)
output_asm_insn (\"srl %L1,0,%L1\", operands);
return \"sllx %H1,32,%3\;or %L0,%2,%2\;or %L1,%3,%3\;cmp %2,%3\";
+ default:
+ abort();
}
}"
[(set_attr "length" "3,4,7")])
diff --git a/gcc/cppalloc.c b/gcc/cppalloc.c
index a32d737820c..bd3a6051971 100644
--- a/gcc/cppalloc.c
+++ b/gcc/cppalloc.c
@@ -24,6 +24,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h"
#include "system.h"
+#include "gansidecl.h"
#include "cpplib.h"
static void
diff --git a/gcc/cpperror.c b/gcc/cpperror.c
index 94bd3e0b8ac..fdd08195c29 100644
--- a/gcc/cpperror.c
+++ b/gcc/cpperror.c
@@ -24,13 +24,21 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef EMACS
#include "config.h"
+#ifdef __STDC__
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
#include "system.h"
+#include "gansidecl.h"
#else
#include <stdio.h>
#endif /* not EMACS */
#include "cpplib.h"
+static void v_cpp_message PROTO ((cpp_reader *, int, const char *, va_list));
+
/* Print the file names and line numbers of the #include
commands which led to the current file. */
@@ -79,7 +87,7 @@ cpp_print_containing_files (pfile)
void
cpp_file_line_for_message (pfile, filename, line, column)
- cpp_reader *pfile;
+ cpp_reader *pfile ATTRIBUTE_UNUSED;
char *filename;
int line, column;
{
@@ -92,11 +100,11 @@ cpp_file_line_for_message (pfile, filename, line, column)
/* IS_ERROR is 2 for "fatal" error, 1 for error, 0 for warning */
void
-cpp_message (pfile, is_error, msg, arg1, arg2, arg3)
- int is_error;
- cpp_reader *pfile;
- char *msg;
- char *arg1, *arg2, *arg3;
+v_cpp_message (pfile, is_error, msg, ap)
+ cpp_reader * pfile;
+ int is_error;
+ const char *msg;
+ va_list ap;
{
if (!is_error)
fprintf (stderr, "warning: ");
@@ -104,10 +112,32 @@ cpp_message (pfile, is_error, msg, arg1, arg2, arg3)
pfile->errors = CPP_FATAL_LIMIT;
else if (pfile->errors < CPP_FATAL_LIMIT)
pfile->errors++;
- fprintf (stderr, msg, arg1, arg2, arg3);
+ vfprintf (stderr, msg, ap);
fprintf (stderr, "\n");
}
+void
+cpp_message VPROTO ((cpp_reader *pfile, int is_error, const char *msg, ...))
+{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ int is_error;
+ const char *msg;
+#endif
+ va_list ap;
+
+ VA_START (ap, msg);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ is_error = va_arg (ap, int);
+ msg = va_arg (ap, const char *);
+#endif
+
+ v_cpp_message(pfile, is_error, msg, ap);
+ va_end(ap);
+}
+
/* Same as cpp_error, except we consider the error to be "fatal",
such as inconsistent options. I.e. there is little point in continuing.
(We do not exit, to support use of cpplib as a library.
@@ -115,18 +145,30 @@ cpp_message (pfile, is_error, msg, arg1, arg2, arg3)
CPP_FATAL_ERRORS. */
void
-cpp_fatal (pfile, str, arg)
- cpp_reader *pfile;
- char *str, *arg;
-{
+cpp_fatal VPROTO ((cpp_reader *pfile, const char *str, ...))
+{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ const char *str;
+#endif
+ va_list ap;
+
+ VA_START (ap, str);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ str = va_arg (ap, const char *);
+#endif
+
fprintf (stderr, "%s: ", progname);
- cpp_message (pfile, 2, str, arg);
+ v_cpp_message (pfile, 2, str, ap);
+ va_end(ap);
}
void
cpp_pfatal_with_name (pfile, name)
cpp_reader *pfile;
- char *name;
+ const char *name;
{
cpp_perror_with_name (pfile, name);
#ifdef VMS
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index bb462af9524..44f8a66547c 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -26,8 +26,8 @@ Written by Per Bothner 1994. */
#include "config.h"
#include "system.h"
-#include "cpplib.h"
#include "gansidecl.h"
+#include "cpplib.h"
extern char *xmalloc PARAMS ((unsigned));
extern char *xrealloc PARAMS ((void *, unsigned));
diff --git a/gcc/cpphash.c b/gcc/cpphash.c
index b1375e14338..6aa9e9c7c12 100644
--- a/gcc/cpphash.c
+++ b/gcc/cpphash.c
@@ -24,9 +24,9 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h"
#include "system.h"
+#include "gansidecl.h"
#include "cpplib.h"
#include "cpphash.h"
-#include "gansidecl.h"
extern char *xmalloc PARAMS ((unsigned));
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index ed06c186aed..2b0668d3eb2 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -36,3 +36,5 @@ static HASHNODE *hashtab[HASHSIZE];
#define MAKE_POS(v) (v & 0x7fffffff) /* make number positive */
extern HASHNODE *install PARAMS ((U_CHAR *,int,enum node_type, int,char *,int));
+extern int hashf PARAMS ((const U_CHAR *, int, int));
+extern void delete_macro PARAMS ((HASHNODE *));
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 08a30a6d321..884bda19908 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -19,6 +19,11 @@ along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
+#ifdef __STDC__
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
#include "system.h"
#ifndef STDC_VALUE
@@ -35,15 +40,15 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# include <sys/resource.h>
#endif
+#include "gansidecl.h"
#include "cpplib.h"
#include "cpphash.h"
-#include "gansidecl.h"
#ifndef GET_ENVIRONMENT
#define GET_ENVIRONMENT(ENV_VALUE,ENV_NAME) ENV_VALUE = getenv (ENV_NAME)
#endif
-extern char *update_path ();
+extern char *update_path PARAMS ((char *, char *));
#undef MIN
#undef MAX
@@ -196,52 +201,56 @@ struct cpp_pending {
/* Forward declarations. */
char *xmalloc ();
-void cpp_fatal ();
-void cpp_file_line_for_message PARAMS ((char *, int, int));
-void cpp_hash_cleanup PARAMS ((cpp_reader *));
-void cpp_message ();
-void cpp_print_containing_files PARAMS ((cpp_reader *));
-
-static void add_import ();
-static void append_include_chain ();
-static void make_assertion ();
-static void path_include ();
-static void initialize_builtins ();
-static void initialize_char_syntax ();
-extern void delete_macro ();
+extern void cpp_hash_cleanup PARAMS ((cpp_reader *));
+extern void v_cpp_message PROTO ((cpp_reader *, int, const char *, va_list));
+
+static void add_import PROTO ((cpp_reader *, int, char *));
+static void append_include_chain PROTO ((cpp_reader *,
+ struct file_name_list *,
+ struct file_name_list *));
+static void make_assertion PROTO ((cpp_reader *, char *, U_CHAR *));
+static void path_include PROTO ((cpp_reader *, char *));
+static void initialize_builtins PROTO ((cpp_reader *));
+static void initialize_char_syntax PROTO ((struct cpp_options *));
#if 0
static void trigraph_pcp ();
#endif
-static int finclude ();
-static void validate_else ();
-static int comp_def_part ();
+static int finclude PROTO ((cpp_reader *, int, char *,
+ int, struct file_name_list *));
+static void validate_else PROTO ((cpp_reader *, char *));
+static int comp_def_part PROTO ((int, U_CHAR *, int, U_CHAR *,
+ int, int));
#ifdef abort
extern void fancy_abort ();
#endif
-static int lookup_import ();
-static int redundant_include_p ();
-static int is_system_include ();
-static struct file_name_map *read_name_map ();
-static char *read_filename_string ();
-static int open_include_file ();
-static int check_macro_name ();
-static int compare_defs ();
-static int compare_token_lists ();
-static HOST_WIDE_INT eval_if_expression ();
-static int change_newlines ();
-extern int hashf ();
-static struct arglist *read_token_list ();
-static void free_token_list ();
-static int safe_read ();
+static int lookup_import PROTO ((cpp_reader *, char *,
+ struct file_name_list *));
+static int redundant_include_p PROTO ((cpp_reader *, char *));
+static int is_system_include PROTO ((cpp_reader *, char *));
+static struct file_name_map *read_name_map PROTO ((cpp_reader *, char *));
+static char *read_filename_string PROTO ((int, FILE *));
+static int open_include_file PROTO ((cpp_reader *, char *,
+ struct file_name_list *));
+static int check_macro_name PROTO ((cpp_reader *, U_CHAR *, char *));
+static int compare_defs PROTO ((cpp_reader *,
+ DEFINITION *, DEFINITION *));
+static int compare_token_lists PROTO ((struct arglist *,
+ struct arglist *));
+static HOST_WIDE_INT eval_if_expression PROTO ((cpp_reader *, U_CHAR *, int));
+static int change_newlines PROTO ((U_CHAR *, int));
+static struct arglist *read_token_list PROTO ((cpp_reader *, int *));
+static void free_token_list PROTO ((struct arglist *));
+static int safe_read PROTO ((int, char *, int));
static void push_macro_expansion PARAMS ((cpp_reader *,
U_CHAR *, int, HASHNODE *));
static struct cpp_pending *nreverse_pending PARAMS ((struct cpp_pending *));
extern char *xrealloc ();
-static char *xcalloc ();
-static char *savestring ();
+static char *xcalloc PROTO ((unsigned, unsigned));
+static char *savestring PROTO ((char *));
-static void conditional_skip ();
-static void skip_if_group ();
+static void conditional_skip PROTO ((cpp_reader *, int,
+ enum node_type, U_CHAR *));
+static void skip_if_group PROTO ((cpp_reader *, int));
static int parse_name PARAMS ((cpp_reader *, int));
/* Last arg to output_line_command. */
@@ -251,33 +260,8 @@ enum file_change_code {same_file, enter_file, leave_file};
extern HOST_WIDE_INT cpp_parse_expr PARAMS ((cpp_reader *));
-extern FILE *fdopen ();
extern char *version_string;
extern struct tm *localtime ();
-
-/* These functions are declared to return int instead of void since they
- are going to be placed in a table and some old compilers have trouble with
- pointers to functions returning void. */
-
-static int do_define ();
-static int do_line ();
-static int do_include ();
-static int do_undef ();
-static int do_error ();
-static int do_pragma ();
-static int do_ident ();
-static int do_if ();
-static int do_xifdef ();
-static int do_else ();
-static int do_elif ();
-static int do_endif ();
-#ifdef SCCS_DIRECTIVE
-static int do_sccs ();
-#endif
-static int do_once ();
-static int do_assert ();
-static int do_unassert ();
-static int do_warning ();
struct file_name_list
{
@@ -360,12 +344,37 @@ static struct default_include {
struct directive {
int length; /* Length of name */
- int (*func)(); /* Function to handle directive */
+ int (*func) /* Function to handle directive */
+ PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
char *name; /* Name of directive */
enum node_type type; /* Code which describes which directive. */
char command_reads_line; /* One if rest of line is read by func. */
};
+/* These functions are declared to return int instead of void since they
+ are going to be placed in a table and some old compilers have trouble with
+ pointers to functions returning void. */
+
+static int do_define PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_line PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_include PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_undef PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_error PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_pragma PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_ident PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_if PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_xifdef PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_else PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_elif PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_endif PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+#ifdef SCCS_DIRECTIVE
+static int do_sccs PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+#endif
+static int do_once PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_assert PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_unassert PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+static int do_warning PARAMS ((cpp_reader *, struct directive *, U_CHAR *, U_CHAR *));
+
#define IS_INCLUDE_DIRECTIVE_TYPE(t) \
((int) T_INCLUDE <= (int) (t) && (int) (t) <= (int) T_IMPORT)
@@ -993,7 +1002,7 @@ handle_directive (pfile)
/* Handle # followed by a line number. */
if (CPP_PEDANTIC (pfile))
cpp_pedwarn (pfile, "`#' followed by integer");
- do_line (pfile, NULL);
+ do_line (pfile, NULL, NULL, NULL);
goto done_a_directive;
}
@@ -3050,7 +3059,7 @@ static int
do_include (pfile, keyword, unused1, unused2)
cpp_reader *pfile;
struct directive *keyword;
- U_CHAR *unused1, *unused2;
+ U_CHAR *unused1 ATTRIBUTE_UNUSED, *unused2 ATTRIBUTE_UNUSED;
{
int importing = (keyword->type == T_IMPORT);
int skip_dirs = (keyword->type == T_INCLUDE_NEXT);
@@ -3671,9 +3680,10 @@ convert_string (pfile, result, in, limit, handle_escapes)
#define FNAME_HASHSIZE 37
static int
-do_line (pfile, keyword)
+do_line (pfile, keyword, unused1, unused2)
cpp_reader *pfile;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
+ U_CHAR *unused1 ATTRIBUTE_UNUSED, *unused2 ATTRIBUTE_UNUSED;
{
cpp_buffer *ip = CPP_BUFFER (pfile);
int new_lineno;
@@ -3848,7 +3858,7 @@ do_undef (pfile, keyword, buf, limit)
static int
do_error (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
U_CHAR *buf, *limit;
{
int length = limit - buf;
@@ -3869,7 +3879,7 @@ do_error (pfile, keyword, buf, limit)
static int
do_warning (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
U_CHAR *buf, *limit;
{
int length = limit - buf;
@@ -3879,7 +3889,7 @@ do_warning (pfile, keyword, buf, limit)
SKIP_WHITE_SPACE (copy);
if (CPP_PEDANTIC (pfile) && !CPP_BUFFER (pfile)->system_header_p)
- cpp_pedwarn ("ANSI C does not allow `#warning'");
+ cpp_pedwarn (pfile, "ANSI C does not allow `#warning'");
/* Use `pedwarn' not `warning', because #warning isn't in the C Standard;
if -pedantic-errors is given, #warning should cause an error. */
@@ -3891,8 +3901,10 @@ do_warning (pfile, keyword, buf, limit)
avoid ever including it again. */
static int
-do_once (pfile)
+do_once (pfile, keyword, unused1, unused2)
cpp_reader *pfile;
+ struct directive *keyword ATTRIBUTE_UNUSED;
+ U_CHAR *unused1 ATTRIBUTE_UNUSED, *unused2 ATTRIBUTE_UNUSED;
{
cpp_buffer *ip = NULL;
struct file_name_list *new;
@@ -3922,8 +3934,8 @@ do_once (pfile)
static int
do_ident (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
- U_CHAR *buf, *limit;
+ struct directive *keyword ATTRIBUTE_UNUSED;
+ U_CHAR *buf ATTRIBUTE_UNUSED, *limit ATTRIBUTE_UNUSED;
{
/* long old_written = CPP_WRITTEN (pfile);*/
@@ -3942,8 +3954,8 @@ do_ident (pfile, keyword, buf, limit)
static int
do_pragma (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
- U_CHAR *buf, *limit;
+ struct directive *keyword ATTRIBUTE_UNUSED;
+ U_CHAR *buf, *limit ATTRIBUTE_UNUSED;
{
while (*buf == ' ' || *buf == '\t')
buf++;
@@ -3952,7 +3964,7 @@ do_pragma (pfile, keyword, buf, limit)
fault. */
if (!CPP_BUFFER (pfile)->system_header_p)
cpp_warning (pfile, "`#pragma once' is obsolete");
- do_once (pfile);
+ do_once (pfile, NULL, NULL, NULL);
}
if (!strncmp (buf, "implementation", 14)) {
@@ -4015,8 +4027,8 @@ nope:
static int
do_sccs (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
- U_CHAR *buf, *limit;
+ struct directive *keyword ATTRIBUTE_UNUSED;
+ U_CHAR *buf ATTRIBUTE_UNUSED, *limit ATTRIBUTE_UNUSED;
{
if (CPP_PEDANTIC (pfile))
cpp_pedwarn (pfile, "ANSI C does not allow `#sccs'");
@@ -4040,7 +4052,7 @@ do_sccs (pfile, keyword, buf, limit)
static int
do_if (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
U_CHAR *buf, *limit;
{
HOST_WIDE_INT value = eval_if_expression (pfile, buf, limit - buf);
@@ -4056,7 +4068,7 @@ do_if (pfile, keyword, buf, limit)
static int
do_elif (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
+ struct directive *keyword ATTRIBUTE_UNUSED;
U_CHAR *buf, *limit;
{
if (pfile->if_stack == CPP_BUFFER (pfile)->if_stack) {
@@ -4099,8 +4111,8 @@ do_elif (pfile, keyword, buf, limit)
static HOST_WIDE_INT
eval_if_expression (pfile, buf, length)
cpp_reader *pfile;
- U_CHAR *buf;
- int length;
+ U_CHAR *buf ATTRIBUTE_UNUSED;
+ int length ATTRIBUTE_UNUSED;
{
HASHNODE *save_defined;
HOST_WIDE_INT value;
@@ -4128,7 +4140,7 @@ static int
do_xifdef (pfile, keyword, unused1, unused2)
cpp_reader *pfile;
struct directive *keyword;
- U_CHAR *unused1, *unused2;
+ U_CHAR *unused1 ATTRIBUTE_UNUSED, *unused2 ATTRIBUTE_UNUSED;
{
int skip;
cpp_buffer *ip = CPP_BUFFER (pfile);
@@ -4408,8 +4420,8 @@ skip_if_group (pfile, any)
static int
do_else (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
- U_CHAR *buf, *limit;
+ struct directive *keyword ATTRIBUTE_UNUSED;
+ U_CHAR *buf ATTRIBUTE_UNUSED, *limit ATTRIBUTE_UNUSED;
{
cpp_buffer *ip = CPP_BUFFER (pfile);
@@ -4451,8 +4463,8 @@ do_else (pfile, keyword, buf, limit)
static int
do_endif (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
- U_CHAR *buf, *limit;
+ struct directive *keyword ATTRIBUTE_UNUSED;
+ U_CHAR *buf ATTRIBUTE_UNUSED, *limit ATTRIBUTE_UNUSED;
{
if (CPP_PEDANTIC (pfile))
validate_else (pfile, "#endif");
@@ -5219,7 +5231,7 @@ parse_name (pfile, c)
}
if (c == '$' && CPP_PEDANTIC (pfile))
- cpp_pedwarn ("`$' in identifier");
+ cpp_pedwarn (pfile, "`$' in identifier");
CPP_RESERVE(pfile, 2); /* One more for final NUL. */
CPP_PUTC_Q (pfile, c);
@@ -6635,7 +6647,7 @@ cpp_handle_options (pfile, argc, argv)
push_pending (pfile, "-U", argv[i] + 2);
else if (i + 1 == argc)
{
- cpp_fatal (pfile, "Macro name missing after -U option", NULL);
+ cpp_fatal (pfile, "Macro name missing after -U option");
return argc;
}
else
@@ -6829,8 +6841,8 @@ cpp_cleanup (pfile)
static int
do_assert (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
- U_CHAR *buf, *limit;
+ struct directive *keyword ATTRIBUTE_UNUSED;
+ U_CHAR *buf ATTRIBUTE_UNUSED, *limit ATTRIBUTE_UNUSED;
{
long symstart; /* remember where symbol name starts */
int c;
@@ -6902,8 +6914,8 @@ do_assert (pfile, keyword, buf, limit)
static int
do_unassert (pfile, keyword, buf, limit)
cpp_reader *pfile;
- struct directive *keyword;
- U_CHAR *buf, *limit;
+ struct directive *keyword ATTRIBUTE_UNUSED;
+ U_CHAR *buf ATTRIBUTE_UNUSED, *limit ATTRIBUTE_UNUSED;
{
long symstart; /* remember where symbol name starts */
int sym_length; /* and how long it is */
@@ -7316,29 +7328,49 @@ cpp_print_file_and_line (pfile)
{
long line, col;
cpp_buf_line_and_col (ip, &line, &col);
- cpp_file_line_for_message (ip->nominal_fname,
+ cpp_file_line_for_message (pfile, ip->nominal_fname,
line, pfile->show_column ? col : -1);
}
}
-void
-cpp_error (pfile, msg, arg1, arg2, arg3)
- cpp_reader *pfile;
- char *msg;
- char *arg1, *arg2, *arg3;
+static void
+v_cpp_error (pfile, msg, ap)
+ cpp_reader *pfile;
+ const char *msg;
+ va_list ap;
{
cpp_print_containing_files (pfile);
cpp_print_file_and_line (pfile);
- cpp_message (pfile, 1, msg, arg1, arg2, arg3);
+ v_cpp_message (pfile, 1, msg, ap);
+}
+
+void
+cpp_error VPROTO ((cpp_reader * pfile, const char *msg, ...))
+{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ const char *msg;
+#endif
+ va_list ap;
+
+ VA_START(ap, msg);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ msg = va_arg (ap, const char *);
+#endif
+
+ v_cpp_error (pfile, msg, ap);
+ va_end(ap);
}
/* Print error message but don't count it. */
-void
-cpp_warning (pfile, msg, arg1, arg2, arg3)
- cpp_reader *pfile;
- char *msg;
- char *arg1, *arg2, *arg3;
+static void
+v_cpp_warning (pfile, msg, ap)
+ cpp_reader *pfile;
+ const char *msg;
+ va_list ap;
{
if (CPP_OPTIONS (pfile)->inhibit_warnings)
return;
@@ -7348,46 +7380,103 @@ cpp_warning (pfile, msg, arg1, arg2, arg3)
cpp_print_containing_files (pfile);
cpp_print_file_and_line (pfile);
- cpp_message (pfile, 0, msg, arg1, arg2, arg3);
+ v_cpp_message (pfile, 0, msg, ap);
+}
+
+void
+cpp_warning VPROTO ((cpp_reader * pfile, const char *msg, ...))
+{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ const char *msg;
+#endif
+ va_list ap;
+
+ VA_START (ap, msg);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ msg = va_arg (ap, const char *);
+#endif
+
+ v_cpp_warning (pfile, msg, ap);
+ va_end(ap);
}
/* Print an error message and maybe count it. */
void
-cpp_pedwarn (pfile, msg, arg1, arg2, arg3)
- cpp_reader *pfile;
- char *msg;
- char *arg1, *arg2, *arg3;
+cpp_pedwarn VPROTO ((cpp_reader * pfile, const char *msg, ...))
{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ const char *msg;
+#endif
+ va_list ap;
+
+ VA_START (ap, msg);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ msg = va_arg (ap, const char *);
+#endif
+
if (CPP_OPTIONS (pfile)->pedantic_errors)
- cpp_error (pfile, msg, arg1, arg2, arg3);
+ v_cpp_error (pfile, msg, ap);
else
- cpp_warning (pfile, msg, arg1, arg2, arg3);
+ v_cpp_warning (pfile, msg, ap);
+ va_end(ap);
}
-void
-cpp_error_with_line (pfile, line, column, msg, arg1, arg2, arg3)
- cpp_reader *pfile;
- int line, column;
- char *msg;
- char *arg1, *arg2, *arg3;
+static void
+v_cpp_error_with_line (pfile, line, column, msg, ap)
+ cpp_reader * pfile;
+ int line;
+ int column;
+ const char * msg;
+ va_list ap;
{
cpp_buffer *ip = cpp_file_buffer (pfile);
cpp_print_containing_files (pfile);
if (ip != NULL)
- cpp_file_line_for_message (ip->nominal_fname, line, column);
+ cpp_file_line_for_message (pfile, ip->nominal_fname, line, column);
- cpp_message (pfile, 1, msg, arg1, arg2, arg3);
+ v_cpp_message (pfile, 1, msg, ap);
+}
+
+void
+cpp_error_with_line VPROTO ((cpp_reader * pfile, int line, int column, const char *msg, ...))
+{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ int line;
+ int column;
+ const char *msg;
+#endif
+ va_list ap;
+
+ VA_START (ap, msg);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ line = va_arg (ap, int);
+ column = va_arg (ap, int);
+ msg = va_arg (ap, const char *);
+#endif
+
+ v_cpp_error_with_line(pfile, line, column, msg, ap);
+ va_end(ap);
}
static void
-cpp_warning_with_line (pfile, line, column, msg, arg1, arg2, arg3)
- cpp_reader *pfile;
- int line, column;
- char *msg;
- char *arg1, *arg2, *arg3;
+v_cpp_warning_with_line (pfile, line, column, msg, ap)
+ cpp_reader * pfile;
+ int line;
+ int column;
+ const char *msg;
+ va_list ap;
{
cpp_buffer *ip;
@@ -7402,50 +7491,96 @@ cpp_warning_with_line (pfile, line, column, msg, arg1, arg2, arg3)
ip = cpp_file_buffer (pfile);
if (ip != NULL)
- cpp_file_line_for_message (ip->nominal_fname, line, column);
+ cpp_file_line_for_message (pfile, ip->nominal_fname, line, column);
- cpp_message (pfile, 0, msg, arg1, arg2, arg3);
+ v_cpp_message (pfile, 0, msg, ap);
+}
+
+#if 0
+static void
+cpp_warning_with_line VPROTO ((cpp_reader * pfile, int line, int column, const char *msg, ...))
+{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ int line;
+ int column;
+ const char *msg;
+#endif
+ va_list ap;
+
+ VA_START (ap, msg);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ line = va_arg (ap, int);
+ column = va_arg (ap, int);
+ msg = va_arg (ap, const char *);
+#endif
+
+ v_cpp_warning_with_line (pfile, line, column, msg, ap);
+ va_end(ap);
}
+#endif
void
-cpp_pedwarn_with_line (pfile, line, column, msg, arg1, arg2, arg3)
- cpp_reader *pfile;
- int line, column;
- char *msg;
- char *arg1, *arg2, *arg3;
+cpp_pedwarn_with_line VPROTO ((cpp_reader * pfile, int line, int column, const char *msg, ...))
{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ int line;
+ int column;
+ const char *msg;
+#endif
+ va_list ap;
+
+ VA_START (ap, msg);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ line = va_arg (ap, int);
+ column = va_arg (ap, int);
+ msg = va_arg (ap, const char *);
+#endif
+
if (CPP_OPTIONS (pfile)->pedantic_errors)
- cpp_error_with_line (pfile, column, line, msg, arg1, arg2, arg3);
+ v_cpp_error_with_line (pfile, column, line, msg, ap);
else
- cpp_warning_with_line (pfile, line, column, msg, arg1, arg2, arg3);
+ v_cpp_warning_with_line (pfile, line, column, msg, ap);
+ va_end(ap);
}
/* Report a warning (or an error if pedantic_errors)
giving specified file name and line number, not current. */
void
-cpp_pedwarn_with_file_and_line (pfile, file, line, msg, arg1, arg2, arg3)
- cpp_reader *pfile;
- char *file;
- int line;
- char *msg;
- char *arg1, *arg2, *arg3;
+cpp_pedwarn_with_file_and_line VPROTO ((cpp_reader *pfile, char *file, int line, const char *msg, ...))
{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ char *file;
+ int line;
+ const char *msg;
+#endif
+ va_list ap;
+
+ VA_START (ap, msg);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ file = va_arg (ap, char *);
+ line = va_arg (ap, int);
+ msg = va_arg (ap, const char *);
+#endif
+
if (!CPP_OPTIONS (pfile)->pedantic_errors
&& CPP_OPTIONS (pfile)->inhibit_warnings)
return;
if (file != NULL)
- cpp_file_line_for_message (file, line, -1);
- cpp_message (pfile, CPP_OPTIONS (pfile)->pedantic_errors,
- msg, arg1, arg2, arg3);
+ cpp_file_line_for_message (pfile, file, line, -1);
+ v_cpp_message (pfile, CPP_OPTIONS (pfile)->pedantic_errors, msg, ap);
+ va_end(ap);
}
-/* This defines "errno" properly for VMS, and gives us EACCES. */
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
#ifndef VMS
#ifndef HAVE_STRERROR
extern int sys_nerr;
@@ -7494,7 +7629,7 @@ my_strerror (errnum)
void
cpp_error_from_errno (pfile, name)
cpp_reader *pfile;
- char *name;
+ const char *name;
{
int e = errno;
cpp_buffer *ip = cpp_file_buffer (pfile);
@@ -7502,7 +7637,7 @@ cpp_error_from_errno (pfile, name)
cpp_print_containing_files (pfile);
if (ip != NULL)
- cpp_file_line_for_message (ip->nominal_fname, ip->lineno, -1);
+ cpp_file_line_for_message (pfile, ip->nominal_fname, ip->lineno, -1);
cpp_message (pfile, 1, "%s: %s", name, my_strerror (e));
}
@@ -7510,7 +7645,7 @@ cpp_error_from_errno (pfile, name)
void
cpp_perror_with_name (pfile, name)
cpp_reader *pfile;
- char *name;
+ const char *name;
{
cpp_message (pfile, 1, "%s: %s: %s", progname, name, my_strerror (errno));
}
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index c474c3f9eb5..49fcc737f05 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -69,11 +69,7 @@ enum cpp_token {
};
#ifndef PARAMS
-#ifdef __STDC__
-#define PARAMS(P) P
-#else
-#define PARAMS(P) ()
-#endif
+#define PARAMS(P) PROTO(P)
#endif /* !PARAMS */
typedef enum cpp_token (*parse_underflow_t) PARAMS((cpp_reader *));
@@ -644,16 +640,20 @@ extern void cpp_buf_line_and_col PARAMS((cpp_buffer *, long *, long *));
extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader *));
extern void cpp_define PARAMS ((cpp_reader*, unsigned char *));
-extern void cpp_error ();
-extern void cpp_warning ();
-extern void cpp_pedwarn ();
-extern void cpp_error_with_line ();
-extern void cpp_pedwarn_with_line ();
-extern void cpp_pedwarn_with_file_and_line ();
-extern void fatal ();
-extern void cpp_error_from_errno ();
-extern void cpp_perror_with_name ();
-extern void cpp_pfatal_with_name ();
+extern void cpp_error PVPROTO ((cpp_reader *, const char *, ...))
+ ATTRIBUTE_PRINTF_2;
+extern void cpp_warning PVPROTO ((cpp_reader *, const char *, ...))
+ ATTRIBUTE_PRINTF_2;
+extern void cpp_pedwarn PVPROTO ((cpp_reader *, const char *, ...))
+ ATTRIBUTE_PRINTF_2;
+extern void cpp_error_with_line PVPROTO ((cpp_reader *, int, int, const char *, ...))
+ ATTRIBUTE_PRINTF_4;
+extern void cpp_pedwarn_with_line PVPROTO ((cpp_reader *, int, int, const char *, ...))
+ ATTRIBUTE_PRINTF_4;
+extern void cpp_pedwarn_with_file_and_line PVPROTO ((cpp_reader *, char *, int, const char *, ...))
+ ATTRIBUTE_PRINTF_4;
+extern void cpp_error_from_errno PROTO ((cpp_reader *, const char *));
+extern void cpp_perror_with_name PROTO ((cpp_reader *, const char *));
extern void cpp_grow_buffer PARAMS ((cpp_reader *, long));
extern int cpp_parse_escape PARAMS ((cpp_reader *, char **));
@@ -667,7 +667,18 @@ extern void cpp_reader_init PARAMS ((cpp_reader *));
extern void cpp_options_init PARAMS ((cpp_options *));
extern int cpp_start_read PARAMS ((cpp_reader *, char *));
extern int cpp_read_check_assertion PARAMS ((cpp_reader *));
+extern int scan_decls PARAMS ((cpp_reader *, int, char **));
extern void skip_rest_of_line PARAMS ((cpp_reader *));
+extern void cpp_finish PARAMS ((cpp_reader *));
+
+/* From cpperror.c */
+extern void cpp_fatal PVPROTO ((cpp_reader *, const char *, ...))
+ ATTRIBUTE_PRINTF_2;
+extern void cpp_message PVPROTO ((cpp_reader *, int, const char *, ...))
+ ATTRIBUTE_PRINTF_3;
+extern void cpp_pfatal_with_name PROTO ((cpp_reader *, const char *));
+extern void cpp_file_line_for_message PROTO ((cpp_reader *, char *, int, int));
+extern void cpp_print_containing_files PROTO ((cpp_reader *));
#ifdef __cplusplus
}
diff --git a/gcc/cppmain.c b/gcc/cppmain.c
index d4b27da4a6d..c7fdf532997 100644
--- a/gcc/cppmain.c
+++ b/gcc/cppmain.c
@@ -23,6 +23,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef EMACS
#include "config.h"
#include "system.h"
+#include "gansidecl.h"
#else
#include <stdio.h>
@@ -54,7 +55,6 @@ main (argc, argv)
char **argv;
{
char *p;
- int i;
int argi = 1; /* Next argument to handle. */
struct cpp_options *opts = &options;
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index f3cb7ed08f2..bc2e2bac455 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -79,6 +79,7 @@ Boston, MA 02111-1307, USA. */
#include "defaults.h"
#include "output.h" /* ASM_OUTPUT_SOURCE_LINE may refer to sdb functions. */
#include "dbxout.h"
+#include "toplev.h"
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h"
diff --git a/gcc/demangle.h b/gcc/demangle.h
index 00f6a0c3bc0..1e1e705512a 100644
--- a/gcc/demangle.h
+++ b/gcc/demangle.h
@@ -87,4 +87,22 @@ cplus_mangle_opname PARAMS ((const char *opname, int options));
extern void
set_cplus_marker_for_demangling PARAMS ((int ch));
+extern void
+do_tlink PARAMS ((char **, char **));
+
+extern void
+collect_execute PARAMS ((char *, char **, char *));
+
+extern void
+collect_exit PARAMS ((int));
+
+extern int
+collect_wait PARAMS ((char *));
+
+extern void
+dump_file PARAMS ((char *));
+
+extern int
+file_exists PARAMS ((char *));
+
#endif /* DEMANGLE_H */
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 0e5db82060b..11229e6ae44 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -2373,7 +2373,9 @@ static char *dwarf_tag_name PROTO((unsigned));
static char *dwarf_attr_name PROTO((unsigned));
static char *dwarf_form_name PROTO((unsigned));
static char *dwarf_stack_op_name PROTO((unsigned));
+#if 0
static char *dwarf_type_encoding_name PROTO((unsigned));
+#endif
static tree decl_ultimate_origin PROTO((tree));
static tree block_ultimate_origin PROTO((tree));
static tree decl_class_context PROTO((tree));
@@ -2504,7 +2506,9 @@ static void add_type_attribute PROTO((dw_die_ref, tree, int, int,
dw_die_ref));
static char *type_tag PROTO((tree));
static tree member_declared_type PROTO((tree));
+#if 0
static char *decl_start_label PROTO((tree));
+#endif
static void gen_array_type_die PROTO((tree, dw_die_ref));
static void gen_set_type_die PROTO((tree, dw_die_ref));
#if 0
@@ -3472,6 +3476,7 @@ dwarf_stack_op_name (op)
/* Convert a DWARF type code into its string name. */
+#if 0
static char *
dwarf_type_encoding_name (enc)
register unsigned enc;
@@ -3498,6 +3503,7 @@ dwarf_type_encoding_name (enc)
return "DW_ATE_<unknown>";
}
}
+#endif
/* Determine the "ultimate origin" of a decl. The decl may be an inlined
instance of an inlined instance of a decl which is local to an inline
@@ -7728,6 +7734,7 @@ member_declared_type (member)
/* Get the decl's label, as described by its RTL. This may be different
from the DECL_NAME name used in the source file. */
+#if 0
static char *
decl_start_label (decl)
register tree decl;
@@ -7745,6 +7752,7 @@ decl_start_label (decl)
fnname = XSTR (x, 0);
return fnname;
}
+#endif
/* These routines generate the internal representation of the DIE's for
the compilation unit. Debugging information is collected by walking
@@ -8049,8 +8057,7 @@ gen_unspecified_parameters_die (decl_or_type, context_die)
register tree decl_or_type;
register dw_die_ref context_die;
{
- register dw_die_ref parm_die = new_die (DW_TAG_unspecified_parameters,
- context_die);
+ new_die (DW_TAG_unspecified_parameters, context_die);
}
/* Generate a list of nameless DW_TAG_formal_parameter DIEs (and perhaps a
@@ -9674,7 +9681,7 @@ dwarf2out_line (filename, line)
void
dwarf2out_start_source_file (filename)
- register char *filename;
+ register char *filename ATTRIBUTE_UNUSED;
{
}
@@ -9709,8 +9716,8 @@ dwarf2out_define (lineno, buffer)
void
dwarf2out_undef (lineno, buffer)
- register unsigned lineno;
- register char *buffer;
+ register unsigned lineno ATTRIBUTE_UNUSED;
+ register char *buffer ATTRIBUTE_UNUSED;
{
}
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index 73621f78006..e80a2c9a92f 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -314,8 +314,10 @@ static char *dwarf_fund_type_name PROTO((unsigned));
static tree decl_ultimate_origin PROTO((tree));
static tree block_ultimate_origin PROTO((tree));
static tree decl_class_context PROTO((tree));
+#if 0
static void output_unsigned_leb128 PROTO((unsigned long));
static void output_signed_leb128 PROTO((long));
+#endif
static inline int is_body_block PROTO((tree));
static int fundamental_type_code PROTO((tree));
static tree root_type_1 PROTO((tree, int));
@@ -413,7 +415,7 @@ static void output_typedef_die PROTO((void *));
static void output_union_type_die PROTO((void *));
static void output_unspecified_parameters_die PROTO((void *));
static void output_padded_null_die PROTO((void *));
-static void output_die PROTO((void (*) (), void *));
+static void output_die PROTO((void (*) PROTO((void *)), void *));
static void end_sibling_chain PROTO((void));
static void output_formal_types PROTO((tree));
static void pend_type PROTO((tree));
@@ -1213,6 +1215,7 @@ decl_class_context (decl)
return context;
}
+#if 0
static void
output_unsigned_leb128 (value)
register unsigned long value;
@@ -1266,6 +1269,7 @@ output_signed_leb128 (value)
}
while (more);
}
+#endif
/**************** utility functions for attribute functions ******************/
@@ -3922,7 +3926,7 @@ output_unspecified_parameters_die (arg)
static void
output_padded_null_die (arg)
- register void *arg;
+ register void *arg ATTRIBUTE_UNUSED;
{
ASM_OUTPUT_ALIGN (asm_out_file, 2); /* 2**2 == 4 */
}
@@ -3937,7 +3941,7 @@ output_padded_null_die (arg)
static void
output_die (die_specific_output_function, param)
- register void (*die_specific_output_function)();
+ register void (*die_specific_output_function) PROTO ((void *));
register void *param;
{
char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
diff --git a/gcc/except.c b/gcc/except.c
index a2213a8e602..0f658941162 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1797,7 +1797,6 @@ output_exception_table_entry (file, n)
{
char buf[256];
rtx sym;
- int eh_entry;
struct handler_info *handler;
handler = get_first_handler (n);
diff --git a/gcc/except.h b/gcc/except.h
index 6cb6dc8878f..4917ab709bc 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -364,6 +364,11 @@ extern int protect_cleanup_actions_with_terminate;
extern tree protect_with_terminate PROTO((tree));
#endif
+extern void expand_fixup_region_start PROTO((void));
+#ifdef TREE_CODE
+extern void expand_fixup_region_end PROTO((tree));
+#endif
+
/* Various hooks for the DWARF 2 __throw routine. */
void expand_builtin_unwind_init PROTO((void));
diff --git a/gcc/expr.c b/gcc/expr.c
index f4e1d219bdc..300e55862af 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -188,7 +188,6 @@ static void preexpand_calls PROTO((tree));
static void do_jump_by_parts_greater PROTO((tree, int, rtx, rtx));
void do_jump_by_parts_greater_rtx PROTO((enum machine_mode, int, rtx, rtx, rtx, rtx));
static void do_jump_by_parts_equality PROTO((tree, rtx, rtx));
-void do_jump_by_parts_equality_rtx PROTO((rtx, rtx, rtx));
static void do_jump_for_compare PROTO((rtx, rtx, rtx));
static rtx compare PROTO((tree, enum rtx_code, enum rtx_code));
static rtx do_store_flag PROTO((tree, rtx, enum machine_mode, int));
diff --git a/gcc/expr.h b/gcc/expr.h
index ef90c842d75..509cbebe46d 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -947,6 +947,7 @@ extern rtx (*lang_expand_expr) PROTO ((union tree_node *, rtx,
extern void init_all_optabs PROTO ((void));
extern void init_mov_optab PROTO ((void));
+extern void do_jump_by_parts_equality_rtx PROTO((rtx, rtx, rtx));
extern void do_jump_by_parts_greater_rtx PROTO ((enum machine_mode, int,
rtx, rtx, rtx, rtx));
diff --git a/gcc/fix-header.c b/gcc/fix-header.c
index 74c251a48e0..8ba79ff6590 100644
--- a/gcc/fix-header.c
+++ b/gcc/fix-header.c
@@ -71,17 +71,19 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Written by Per Bothner <bothner@cygnus.com>, July 1993. */
#include "hconfig.h"
+#ifdef __STDC__
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
#include "system.h"
+#include "gansidecl.h"
#include "obstack.h"
#include "scan.h"
#include "cpplib.h"
-#include "gansidecl.h"
+#include "cpphash.h"
-extern void cpp_fatal ();
-
-#if !__STDC__ && !defined(const)
-#define const /* nothing */
-#endif
+void fatal PVPROTO ((const char *, ...)) ATTRIBUTE_PRINTF_1;
sstring buf;
@@ -1327,7 +1329,8 @@ main (argc, argv)
because we want to suppress error messages. */
void
-cpp_file_line_for_message (filename, line, column)
+cpp_file_line_for_message (pfile, filename, line, column)
+ cpp_reader * pfile;
char *filename;
int line, column;
{
@@ -1347,11 +1350,12 @@ cpp_print_containing_files (pfile)
/* IS_ERROR is 2 for fatal error, 1 for error, 0 for warning */
-void cpp_message (pfile, is_error, msg, arg1, arg2, arg3)
- int is_error;
+void
+v_cpp_message (pfile, is_error, msg, ap)
cpp_reader *pfile;
- char *msg;
- char *arg1, *arg2, *arg3;
+ int is_error;
+ const char *msg;
+ va_list ap;
{
if (is_error == 1)
pfile->errors++;
@@ -1361,32 +1365,86 @@ void cpp_message (pfile, is_error, msg, arg1, arg2, arg3)
return;
if (!is_error)
fprintf (stderr, "warning: ");
- fprintf (stderr, msg, arg1, arg2, arg3);
+ vfprintf (stderr, msg, ap);
fprintf (stderr, "\n");
}
void
-fatal (str, arg)
- char *str, *arg;
+cpp_message VPROTO ((cpp_reader *pfile, int is_error, const char *msg, ...))
+{
+#ifndef __STDC__
+ cpp_reader *pfile;
+ int is_error;
+ const char *msg;
+#endif
+ va_list ap;
+
+ VA_START (ap, msg);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ is_error = va_arg (ap, const int);
+ msg = va_arg (ap, const char *);
+#endif
+
+ v_cpp_message(pfile, is_error, msg, ap);
+ va_end(ap);
+}
+
+static void
+v_fatal (str, ap)
+ const char * str;
+ va_list ap;
{
fprintf (stderr, "%s: %s: ", progname, inc_filename);
- fprintf (stderr, str, arg);
+ vfprintf (stderr, str, ap);
fprintf (stderr, "\n");
+
exit (FATAL_EXIT_CODE);
}
void
-cpp_fatal (pfile, str, arg)
- cpp_reader *pfile ATTRIBUTE_UNUSED;
- char *str, *arg;
+fatal VPROTO ((const char *str, ...))
{
- fatal (str, arg);
+#ifndef __STDC__
+ const char *str;
+#endif
+ va_list ap;
+
+ VA_START(ap, str);
+
+#ifndef __STDC__
+ str = va_arg (ap, const char *);
+#endif
+
+ v_fatal(str, ap);
+ va_end(ap);
+}
+
+void
+cpp_fatal VPROTO ((cpp_reader * pfile, const char *str, ...))
+{
+#ifndef __STDC__
+ cpp_reader * pfile;
+ const char *str;
+#endif
+ va_list ap;
+
+ VA_START(ap, str);
+
+#ifndef __STDC__
+ pfile = va_arg (ap, cpp_reader *);
+ str = va_arg (ap, const char *);
+#endif
+
+ v_fatal(str, ap);
+ va_end(ap);
}
void
cpp_pfatal_with_name (pfile, name)
cpp_reader *pfile;
- char *name;
+ const char *name;
{
cpp_perror_with_name (pfile, name);
exit (FATAL_EXIT_CODE);
diff --git a/gcc/flow.c b/gcc/flow.c
index 95beb78d1ca..4ade02ae5c3 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -262,7 +262,6 @@ static void mark_label_ref PROTO((rtx, rtx, int));
static void life_analysis_1 PROTO((rtx, int));
void allocate_for_life_analysis PROTO((void));
void init_regset_vector PROTO((regset *, int, struct obstack *));
-void free_regset_vector PROTO((regset *, int));
static void propagate_block PROTO((regset, rtx, rtx, int,
regset, int));
static rtx flow_delete_insn PROTO((rtx));
diff --git a/gcc/function.c b/gcc/function.c
index d2cd64eb092..2d1056f4371 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -439,12 +439,14 @@ static void pad_to_arg_alignment PROTO((struct args_size *, int));
static void pad_below PROTO((struct args_size *, enum machine_mode,
tree));
#endif
+#ifdef ARGS_GROW_DOWNWARD
static tree round_down PROTO((tree, int));
+#endif
static rtx round_trampoline_addr PROTO((rtx));
static tree blocks_nreverse PROTO((tree));
static int all_blocks PROTO((tree, tree *));
-static int *record_insns PROTO((rtx));
#if defined (HAVE_prologue) || defined (HAVE_epilogue)
+static int *record_insns PROTO((rtx));
static int contains PROTO((rtx, int *));
#endif /* HAVE_prologue || HAVE_epilogue */
static void put_addressof_into_stack PROTO((rtx));
@@ -4747,6 +4749,7 @@ pad_below (offset_ptr, passed_mode, sizetree)
}
#endif
+#ifdef ARGS_GROW_DOWNWARD
static tree
round_down (value, divisor)
tree value;
@@ -4756,6 +4759,7 @@ round_down (value, divisor)
size_binop (FLOOR_DIV_EXPR, value, size_int (divisor)),
size_int (divisor));
}
+#endif
/* Walk the tree of blocks describing the binding levels within a function
and warn about uninitialized variables.
@@ -5944,6 +5948,7 @@ static int *epilogue;
/* Create an array that records the INSN_UIDs of INSNS (either a sequence
or a single insn). */
+#if defined (HAVE_prologue) || defined (HAVE_epilogue)
static int *
record_insns (insns)
rtx insns;
@@ -5969,7 +5974,6 @@ record_insns (insns)
/* Determine how many INSN_UIDs in VEC are part of INSN. */
-#if defined (HAVE_prologue) || defined (HAVE_epilogue)
static int
contains (insn, vec)
rtx insn;
diff --git a/gcc/gansidecl.h b/gcc/gansidecl.h
index 68cf7b26403..f994b2d5c3e 100644
--- a/gcc/gansidecl.h
+++ b/gcc/gansidecl.h
@@ -59,6 +59,8 @@ Boston, MA 02111-1307, USA. */
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
+#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
+#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
#endif /* ATTRIBUTE_PRINTF */
/* Define a generic NULL if one hasn't already been defined. */
diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c
index f423b3ff86e..8b018cdc526 100644
--- a/gcc/gen-protos.c
+++ b/gcc/gen-protos.c
@@ -17,6 +17,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "hconfig.h"
#include "system.h"
+#include "gansidecl.h"
#include "scan.h"
#include "cpplib.h"
#include "cpphash.h"
@@ -28,9 +29,9 @@ char *progname;
int hash_tab[HASH_SIZE];
int next_index;
-static int
+int
hashf (name, len, hashsize)
- register U_CHAR *name;
+ register const U_CHAR *name;
register int len;
int hashsize;
{
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 3038f684a92..3914c64d4aa 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -952,12 +952,12 @@ check_attr_test (exp, is_const)
return exp;
}
else
- fatal ("Unknown attribute `%s' in EQ_ATTR", XEXP (exp, 0));
+ fatal ("Unknown attribute `%s' in EQ_ATTR", XSTR (exp, 0));
}
if (is_const && ! attr->is_const)
fatal ("Constant expression uses insn attribute `%s' in EQ_ATTR",
- XEXP (exp, 0));
+ XSTR (exp, 0));
/* Copy this just to make it permanent,
so expressions using it can be permanent too. */
@@ -974,7 +974,7 @@ check_attr_test (exp, is_const)
for (p = XSTR (exp, 1); *p; p++)
if (*p < '0' || *p > '9')
fatal ("Attribute `%s' takes only numeric values",
- XEXP (exp, 0));
+ XSTR (exp, 0));
}
else
{
@@ -985,7 +985,7 @@ check_attr_test (exp, is_const)
if (av == NULL)
fatal ("Unknown value `%s' for `%s' attribute",
- XEXP (exp, 1), XEXP (exp, 0));
+ XSTR (exp, 1), XSTR (exp, 0));
}
}
else
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index d10a743f46a..1c5245c2d86 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -164,6 +164,7 @@
#include "insn-config.h"
#include "insn-attr.h"
#include "except.h"
+#include "toplev.h"
extern char *reg_known_equiv_p;
extern rtx *reg_known_value;
@@ -1471,7 +1472,7 @@ find_rgns (s_preds, s_succs, num_preds, num_succs, dom)
{
int *max_hdr, *dfs_nr, *stack, *queue, *degree;
char no_loops = 1;
- int node, child, loop_head, i, j, head, tail;
+ int node, child, loop_head, i, head, tail;
int count = 0, sp, idx = 0, current_edge = out_edges[0];
int num_bbs, num_insns, unreachable;
int too_large_failure;
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 7a588884e86..ef78b0a9248 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -1018,7 +1018,7 @@ save_constants (px)
static void
note_modified_parmregs (reg, x)
rtx reg;
- rtx x;
+ rtx x ATTRIBUTE_UNUSED;
{
if (GET_CODE (reg) == REG && in_nonparm_insns
&& REGNO (reg) < max_parm_reg
@@ -3096,7 +3096,7 @@ subst_constants (loc, insn, map)
void
mark_stores (dest, x)
rtx dest;
- rtx x;
+ rtx x ATTRIBUTE_UNUSED;
{
int regno = -1;
enum machine_mode mode;
diff --git a/gcc/jump.c b/gcc/jump.c
index 49c07fcb39e..74b038c7c79 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -4347,7 +4347,7 @@ static int modified_mem;
static void
mark_modified_reg (dest, x)
rtx dest;
- rtx x;
+ rtx x ATTRIBUTE_UNUSED;
{
int regno, i;
diff --git a/gcc/output.h b/gcc/output.h
index c0e113ff10e..c3c0381ded6 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -83,6 +83,11 @@ extern void output_operand_lossage PROTO((char *));
Defined in final.c. */
extern void output_asm_insn PROTO((char *, rtx *));
+/* Compute a worst-case reference address of a branch so that it
+ can be safely used in the presence of aligned labels.
+ Defined in final.c. */
+extern int insn_current_reference_address PROTO((rtx));
+
/* Output a LABEL_REF, or a bare CODE_LABEL, as an assembler symbol. */
extern void output_asm_label PROTO((rtx));
@@ -140,6 +145,10 @@ extern void readonly_data_section PROTO((void));
/* Determine if we're in the text section. */
extern int in_text_section PROTO((void));
+#ifdef EH_FRAME_SECTION_ASM_OP
+extern void eh_frame_section PROTO ((void));
+#endif
+
#ifdef TREE_CODE
/* Tell assembler to change to section NAME for DECL.
If DECL is NULL, just switch to section NAME.
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
index ba239d19d00..0187c34127a 100644
--- a/gcc/print-rtl.c
+++ b/gcc/print-rtl.c
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "rtl.h"
+#include "bitmap.h"
/* How to print out a register name.
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 1b4e8e4886f..094c6ba662d 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2108,7 +2108,9 @@ reload (first, global, dumpfile)
for (insn = first; insn; insn = NEXT_INSN (insn))
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
{
+#ifdef PRESERVE_DEATH_INFO_REGNO_P
rtx note, next;
+#endif
if (GET_CODE (PATTERN (insn)) == USE
&& find_reg_note (insn, REG_EQUAL, NULL_RTX))
@@ -4215,7 +4217,7 @@ reload_as_needed (first, live_known)
static void
forget_old_reloads_1 (x, ignored)
rtx x;
- rtx ignored;
+ rtx ignored ATTRIBUTE_UNUSED;
{
register int regno;
int nr;
@@ -5448,7 +5450,6 @@ choose_reload_regs (insn, avoid_return_reg)
{
register int regno = -1;
enum machine_mode mode;
- rtx in;
if (reload_in[r] == 0)
;
@@ -7912,7 +7913,7 @@ reload_cse_invalidate_mem (mem_rtx)
static void
reload_cse_invalidate_rtx (dest, ignore)
rtx dest;
- rtx ignore;
+ rtx ignore ATTRIBUTE_UNUSED;
{
while (GET_CODE (dest) == STRICT_LOW_PART
|| GET_CODE (dest) == SIGN_EXTRACT
@@ -8602,7 +8603,7 @@ static rtx reload_cse_check_src;
static void
reload_cse_check_clobber (dest, ignore)
rtx dest;
- rtx ignore;
+ rtx ignore ATTRIBUTE_UNUSED;
{
if (reg_overlap_mentioned_p (dest, reload_cse_check_src))
reload_cse_check_clobbered = 1;
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 597b79f07b6..26b5aa59612 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1378,6 +1378,7 @@ extern int num_validated_changes PROTO ((void));
extern int recog PROTO ((rtx, rtx, int *));
/* In stmt.c */
+extern void expand_null_return PROTO((void));
extern void emit_jump PROTO ((rtx));
extern int preserve_subexpressions_p PROTO ((void));
@@ -1404,13 +1405,14 @@ extern rtx expand_mult_highpart PROTO ((enum machine_mode, rtx,
int, int));
/* In global.c */
-extern void mark_elimiation PROTO ((int, int));
+extern void mark_elimination PROTO ((int, int));
#ifdef BUFSIZ
extern int global_alloc PROTO ((FILE *));
extern void dump_global_regs PROTO ((FILE *));
#endif
/* In regclass.c */
+extern int reg_classes_intersect_p PROTO ((enum reg_class, enum reg_class));
extern int reg_class_subset_p PROTO ((enum reg_class, enum reg_class));
extern void globalize_reg PROTO ((int));
extern void init_regs PROTO ((void));
diff --git a/gcc/scan-decls.c b/gcc/scan-decls.c
index 5b947a412e3..d2f32a86cf9 100644
--- a/gcc/scan-decls.c
+++ b/gcc/scan-decls.c
@@ -19,6 +19,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "hconfig.h"
#include "system.h"
+#include "gansidecl.h"
#include "cpplib.h"
#include "scan.h"
diff --git a/gcc/tree.h b/gcc/tree.h
index 00bd4caa6b6..ec6b3fa01e6 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1822,6 +1822,7 @@ extern int pushcase PROTO((tree,
extern int pushcase_range PROTO((tree, tree,
tree (*) (tree, tree),
tree, tree *));
+extern void using_eh_for_cleanups PROTO((void));
/* In fold-const.c */
@@ -2123,6 +2124,7 @@ extern void fixup_signed_type PROTO ((tree));
/* varasm.c */
extern void make_decl_rtl PROTO ((tree, char *, int));
extern void make_decl_one_only PROTO ((tree));
+extern int supports_one_only PROTO ((void));
extern void variable_section PROTO ((tree, int));
/* In fold-const.c */
OpenPOWER on IntegriCloud