Commit Graph

82 Commits

Author SHA1 Message Date
Gabriel Dos Reis
bd6bec6be2 diagnostic.h (output_buffer_state): Redefine.
* diagnostic.h (output_buffer_state): Redefine.
	(output_format_decoder): New macro.
	(output_prefixing_rule): Likewise.
	(output_line_cutoff): Likewise.
	(diagnostic_format_decoder): Adjust.
	(diagnostic_prefixing_rule): Likewise.
	(diagnostic_line_cutoff): Likewise.
	(diagnostic_state): Likewise.
	(diagnostic_kind_count): Likewise.
	(diagnostic_buffer): Now a macro.

	* diagnostic.c (diagnostic_buffer): Remove definition.
	(output_is_line_wrapping): Adjust.
	(set_real_maximum_length): Likewise.
	(output_set_maximum_length): Likewise.
	(init_output_buffer): Likewise.
	(lhd_print_error_function): Likewise.
	(output_do_verbatim): Likewise.

cp/
	* error.c (cxx_print_error_function): Adjust call to macros.

From-SVN: r52307
2002-04-14 23:35:36 +00:00
Neil Booth
b18101c75f diagnostic.c: Include langhooks-def.h.
* diagnostic.c: Include langhooks-def.h.
	* Makefile.in (diagnostic.o): Update.

From-SVN: r51674
2002-03-31 22:59:14 +00:00
Neil Booth
7cb3282270 diagnostic.c (print_error_function): Remove.
* diagnostic.c (print_error_function): Remove.
	(default_print_error_function): Rename.
	(report_error_function): Update.
	* diagnostic.h (print_error_function): Remove.
	(default_print_error_function): Remove.
	* langhooks-def.h (struct diagnostic_context): Predeclare.
	(lhd_print_error_function, LANG_HOOKS_PRINT_ERROR_FUNCTION): New.
	(LANG_HOOKS_INITIALIZER): Update.
	* langhooks.h (struct diagnostic context): Predeclare.
	(struct lang_hooks): New hook.
cp:
	* Make-lang.in (error.o): Update.
	* cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
	* cp-tree.h (struct diagnostic_context): Predeclare.
	(cxx_print_error_function): New.
	* error.c: Include langhooks-def.h.
	(lang_print_error_function): Rename.  Update.
	(init_error): Don't set hook.
f:
	* com.c (lang_print_error_function): Rename.
	(LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
	(ffe_init): Don't set hook.
java:
	* lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
	(java_dummy_print): Remove.
	(lang_print_error): Rename.  Exit early if inhibiting output.
	(inhibit_error_printing_function): New.
	(java_init): Don't set hook.
	(lang_init_source): Use new boolean.

From-SVN: r51672
2002-03-31 22:32:05 +00:00
Neil Booth
7afff7cfb0 Makefile.in: Update.
* Makefile.in: Update.
	* c-common.c: Include langhooks.h.
	(inline_forbidden_p): Use new hook.
	* diagnostic.c: Include langhooks.h.
	(format_with_decl, announce_function,
	default_print_error_function): Use new hook.
	* dwarf2out.c (dwarf2_name): Use new hook.
	* function.c: Include langhooks.h.
	(init_function_start): Use new hook.
	* langhooks-def.h (lhd_decl_printable_name): New.
	(LANGHOOKS_DECL_PRINTABLE_NAME): New.
	(LANGHOOKS_INITIALIZER): Update.
	* langhooks.c (lhd_decl_printable_name): New.
	* langhooks.h (struct lang_hooks): New hook.
	* toplev.c (decl_name, decl_printable_name): Remove.
	(open_dump_file): Use new hook.
	(process_options): Remove old hook.
	* tree.h (decl_printable_name): Remove.
ada:
	* misc.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
	(gnat_init): Remove old hook.
cp:
	* cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
	* cp-tree.h (lang_printable_name): Rename.
	* error.c (lang_decl_name): Use new hook.
	* lex.c (cxx_init): Remove old hook.
	* pt.c (tsubst_expr): Use new hook.
	* tree.c (lang_printable_name): Rename.
f:
	* com.c (lang_printable_name): Rename.
	(LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
	(ffe_init): Don't use old hook.
java:
	* decl.c (start_java_method): Use new hook.
	* lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
	(java_init): Remove old hook.
objc:
	* objc-act.c (objc_init): Remove old hook.
	(objc_printable_name): Export.
	* objc-act.h (objc_printable_name): New.
	* objc-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.

From-SVN: r51066
2002-03-20 07:58:41 +00:00
Zack Weinberg
a63bea75b1 diagnostic.c (internal_error): Do ICE suppression only when ENABLE_CHECKING is not defined.
* diagnostic.c (internal_error): Do ICE suppression only
	when ENABLE_CHECKING is not defined.

From-SVN: r49151
2002-01-23 19:34:08 +00:00
Richard Kenner
93efb9de8c Properly indent two lines.
From-SVN: r49043
2002-01-21 07:35:58 -05:00
Richard Kenner
bb93b973c9 diagnostic.c (warn_deprecated_use): Rework to lower indentation.
* diagnostic.c (warn_deprecated_use): Rework to lower indentation.
	* expr.c (emit_move_insn_1): Remove warning, use HOST_WIDE_INT for
	offsets, and change line folding.
	* optabs.c (expand_binop): Remove warnings.
	* sdbout.c (sdbout_record_type_name): Constify NAME to avoid warning.

From-SVN: r48801
2002-01-12 09:05:32 -05:00
Graham Stott
f9f6b7df9d attribs.c (handle_deprecated_attribute): constify WHAT.
* attribs.c (handle_deprecated_attribute): constify WHAT.
        * diagnostic.c (warn_deprecated_use): Add braces, fixes
        dangling else warning and constify WHAT.
        * except.h (struct function, struct inline_remap): Move
        struct tag forward defs before all prototypes.
        (duplicate_eh_regions): Whitespace.

From-SVN: r48799
2002-01-12 13:45:39 +00:00
Ira Ruben
e23bd2185f Added __attribute__((deprecated)) patches.
From-SVN: r48743
2002-01-10 18:51:24 +00:00
Kazu Hirata
173bf5be74 c-common.c: Fix formatting.
* c-common.c: Fix formatting.
	* diagnostic.c: Likewise.
	* doloop.c: Likewise.
	* dwarf2out.c: Likewise.

From-SVN: r48526
2002-01-04 02:00:26 +00:00
Jason Merrill
4ff8507ec5 diagnostic.c (sorry): Increment sorrycount before saving the buffer state.
* diagnostic.c (sorry): Increment sorrycount before saving the
        buffer state.

From-SVN: r48005
2001-12-14 15:13:55 -05:00
Joseph Myers
a1f300c0f1 ChangeLog.0, [...]: Fix spelling errors.
* ChangeLog.0, ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog,
	FSFChangeLog.10, c-decl.c, cppfiles.c, cppinit.c, cpplex.c,
	cpplib.c, cppmain.c, cse.c, df.c, diagnostic.c, dominance.c,
	dwarf2out.c, dwarfout.c, emit-rtl.c, errors.c, except.c, except.h,
	explow.c, function.c, gcse.c, genrecog.c, predict.c, regmove.c,
	sched-rgn.c, ssa-ccp.c, stmt.c, toplev.c: Fix spelling errors.

From-SVN: r47279
2001-11-23 02:05:19 +00:00
Kaveh R. Ghazi
83182544db c-parse.in (yyerror): Const-ification and/or static-ization.
* c-parse.in (yyerror): Const-ification and/or static-ization.
	* c-typeck.c (push_member_name): Likewise.
	* collect2.c (main): Likewise.
	* dbxout.c (dbxout_parms): Likewise.
	* diagnostic.c (format_with_decl): Likewise.
	* dwarf2out.c (output_ranges): Likewise.
	* dwarfout.c (fundamental_type_code): Likewise.
	* except.c (dw2_output_call_site_table): Likewise.
	* gcc.c (do_spec_1): Likewise.
	* genopinit.c (optabs): Likewise.
	* objc/objc-act.c (synth_id_with_class_suffix, start_class,
	gen_declaration_1, handle_impent): Likewise.
	* protoize.c (default_include, in_system_include_dir, abspath):
	Likewise.
	* sched-vis.c (visualize_stall_cycles): Likewise.
	* sdbout.c (plain_type_1, sdbout_end_function,
	sdbout_end_epilogue): Likewise.
	* varasm.c (decode_reg_name): Likewise.

	* 1750a.c (mod_regno_adjust): Likewise.
	* alpha.c (alpha_write_one_linkage,
	unicosmk_output_default_externs): Likewise.
	* arm.c (arm_condition_codes): Likewise.
	* arm.h (arm_condition_codes): Likewise.
	* avr.c (output_movsisf, encode_section_info): Likewise.
	* darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL):
	Likewise.
	* i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
	* i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
	* m88k.c (output_function_profiler): Likewise.
	* mips.c (mips_output_conditional_branch): Likewise.
	* ns32k.c (ns32k_out_reg_names): Likewise.
	* ns32k.h (ns32k_out_reg_names): Likewise.
	* pj.c (pj_output_rval): Likewise.
	* rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise.
	* sparc.c (sparc_flat_function_prologue,
	sparc_flat_function_epilogue): Likewise.

cp:
	* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
	Const-ification.
	* pt.c (tsubst_decl): Likewise.

f:
	* bad.c (ffebad_finish): Const-ification and/or static-ization.
	* intrin.c (ffeintrin_cmp_name_): Likewise.
	* stc.c (ffestc_R904): Likewise.

java:
	* expr.c (expand_invoke): Const-ification.
	* parse.y (patch_method_invocation): Likewise.

From-SVN: r45581
2001-09-13 14:37:29 +00:00
Andreas Jaeger
79e8ec0eb2 (forgot in last checkin)
Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.

From-SVN: r45223
2001-08-28 06:55:48 +02:00
Lars Brinkhoff
1322177dbd Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
	bitmap.h, builtin-types.def, builtins.c, builtins.def,
	c-aux-info.c, c-common.c, c-common.def, c-common.h,
	c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
	c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
	caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
	conditions.h, config.gcc, configure.frag, configure.in,
	conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
	cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
	dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
	doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
	dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
	emit-rtl.c, errors.c, errors.h, except.c, except.h,
	exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
	fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
	function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
	gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
	gencheck.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, gengenrtl.c, genmultilib,
	genopinit.c, genoutput.c, genpeep.c, genrecog.c,
	gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
	ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
	graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
	gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
	gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
	hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
	integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
	libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
	machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
	mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
	mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
	params.h, predict.c, predict.def, predict.h, prefix.c,
	prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
	read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
	regclass.c, regmove.c, regrename.c, regs.h, reload.c,
	reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
	rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
	sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
	sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
	ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
	stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
	tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
	tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
	unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
	unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
	xcoffout.h: replace "GNU CC" with "GCC".

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Zack Weinberg
d9b6874b0c final.c (shorten_branches): Clear the end of the label_align array only if we made it larger.
* final.c (shorten_branches): Clear the end of the label_align
	array only if we made it larger.  Break up messy expressions
	for clarity.

	* diagnostic.c (internal_error): Check for error recursion
	before doing ICE suppression.

	* timevar.c: Timing variables now count in milliseconds.
	(init_timevar): Set up ticks_to_msec and clocks_to_msec here.
	(get_time): Not here.
	(timevar_print): Don't print any timer whose user, cpu, and
	wall times are all zero as displayed.
	* timevar.h: Update comment aboout units.  Make timevar
	counters unsigned.

From-SVN: r44948
2001-08-17 01:27:49 +00:00
Gabriel Dos Reis
c895acf211 Makefile.in (OBJS): Add rtl-error.o
* Makefile.in (OBJS): Add rtl-error.o
	(rtl-error.o): New rule.
	(diagnostic.o): Adjust dependency.
	diagnostic.c (file_and_line_for_asm, diagnostic_for_asm,
	error_for_asm, _fatal_insn, _fatal_insn_not_found,
	warning_for_asm): Move to...
	rtl-error.c: ...here.  New file.

From-SVN: r44894
2001-08-14 19:22:48 +00:00
Kazu Hirata
30f7a3786c dbxout.c: Fix comment formatting.
* dbxout.c: Fix comment formatting.
	* dependence.c: Likewise.
	* df.c: Likewise.
	* diagnostic.c: Likewise.
	* dominance.c: Likewise.
	* doprint.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.

From-SVN: r44729
2001-08-08 22:06:48 +00:00
Gabriel Dos Reis
64dfaa76b3 diagnostic.c (finish_diagnostic): Rename to diagnostic_finish.
* diagnostic.c (finish_diagnostic): Rename to
        diagnostic_finish. Make it take an 'output_buffer *'.  Adjust
        calls thourghout.

From-SVN: r43905
2001-07-10 16:04:55 +00:00
Gabriel Dos Reis
46f018e138 diagnostic.c (default_print_error_function): Tweak.
* diagnostic.c (default_print_error_function): Tweak.
	(report_error_function): Likewise.
	* toplev.h (default_print_error_function): Move to...
	* diagnostic.h: ...here. Add a `diagnostic_context *' parameter.
	* tree.h (print_error_function): Move to...
	* diagnostic.h: ...here. Add a `diagnostic_context *' parameter.

ch/

	* lang.c: #include diagnostic.h
	(chill_print_error_function): Add a dummy `diagnostic_context *'.
	* Makefile.in (lang.o): Depend on diagnostic.h

cp/

	* error.c (lang_print_error_function): Add a `diagnostic_context *'
	parameter. Tweak.

f/

	* Make-lang.in (f/com.o): Depend on diagnostic.h
	* com.c: #include diagnostic.h
	(lang_print_error_function): Take a 'diagnostic_context *'.

java/

	* lang.c: #include diagnostic.h
	(lang_print_error): Add a `diagnostic_context *' parameter.
	(java_dummy_print): Likewise.
	* Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h

From-SVN: r43638
2001-06-28 12:26:38 +00:00
Gabriel Dos Reis
6b67c26e61 diagnostic.h: Add documentation.
2001-06-27  Gabriel Dos Reis  <gdr@codesourcery.com>

	* diagnostic.h: Add documentation. Make macros polymorphic.
	* diagnostic.c (ideal_line_wrap_cutoff): Remove
	definition. Replace with diagnostic_line_cutoff.
	(prefixing_policy): Remove. Replace with diagnostic_prefixing_rule.

From-SVN: r43616
2001-06-27 18:03:03 +00:00
Gabriel Dos Reis
9596ddd67e toplev.c (decode_f_option): Adjust setting.
* toplev.c (decode_f_option): Adjust setting.
	(toplev_main): Call diagnostic_initialize.  Remove call to
	reshape_diagnostic_buffer._

	* diagnostic.h (struct output_buffer): Add new field format_decoder.
	(diagnostic_format_decoder): New macro.
	(diagnostic_prefixing_rule): Likewise.
	(diagnostic_line_cutoff): Likewise.
	(set_message_prefixing_rule): Remove.

	* diagnostic.c (lang_printer): Remove.
	(diagnostic_message_length_per_line): Likewise.
	(current_prefixing_rule): Likewise.
	(initialize_diagnostics): Rename to...
	(diagnostic_initialize): ...this. Tweak.
	(default_initialize_buffer): Remove.
	(reshape_diagnostic_buffer): Likewise.
	(init_output_buffer): Adjust prefixing rule setting.
	(output_format): Use format_decoder from the output_buffer.

	* c-lang.c (c_init): Adjust tree formatter setting.

cp/
  	* error.c (init_error): Adjust settings.

From-SVN: r43588
2001-06-26 19:18:37 +00:00
Gabriel Dos Reis
f68fc4db62 diagnostic.h (struct diagnostic_context): Add new field.
* diagnostic.h (struct diagnostic_context): Add new field.
	(lang_diagnostic_starter, lang_diagnostic_finalizer): Remove
	declaratons.
	(global_dc): Declare.
	* diagnostic.c (global_diagnostic_context): New variable.
	(global_output_buffer): Remove.
	(global_dc): Define.
	(lang_diagnostic_starter, lang_diagnostic_finalizer): Remove
 	definitions.
	(initialize_diagnostics): Adjust initialization.
	(set_diagnostic_context): Adjust setting.

cp/

	* error.c (init_error): Adjust settings.

From-SVN: r43581
2001-06-26 14:06:07 +00:00
Gabriel Dos Reis
0deaa8136a diagnostic.h (diagnostic_prefixing_rule_t): New enum type.
* diagnostic.h (diagnostic_prefixing_rule_t): New enum type.
	(set_message_prefixing_rule): Adjust prototype.
	* diagnostic.c (current_prefixing_rule): Adjust type.

From-SVN: r43573
2001-06-26 07:53:50 +00:00
Gabriel Dos Reis
255fcfbb81 diagnostic.c (digit_buffer): Remove as global.
* diagnostic.c (digit_buffer): Remove as global.  Move to...
	* diagnostic.h (struct output_buffer): ... here.
	* diagnostic.c (output_formatted_integer): Adjust use of digit_buffer.

From-SVN: r43567
2001-06-26 05:42:06 +00:00
Gabriel Dos Reis
2a2b2d432e Makefile.in (c-parse.o): Depend on diagnostic.h
gcc/

2001-06-10  Mark Mitchell <mark@codesourcery.com>
	    Gabriel Dos Reis  <gdr@codesourcery.com>

	* Makefile.in (c-parse.o): Depend on diagnostic.h
	(dwarf2out.o): Likewise.

	* dwarf2out.c: #include diagnostic.h

	* toplev.h (warningcount, errorcount, sorrycount): Remove
	declarations.

	* toplev.c (warningcount, errorcount, sorrycount): Remove
	definitions.

	* diagnostic.h (struct output_buffer): Reorder fields.
	(diagnostic_kind_count): New macro.
	(errorcount, warningcount, sorrycount): Define as macros.
	(diagnostic_report_warnings_p): New macro.
	(output_state): Add diagnostic_count field.

	* diagnostic.c (warningcount, errorcount, inhibit_warnings):
	Remove tentative declaration.
	(count_error): Use diagnostic_report_warnings_p.

	* c-parse.in: #include diagnostic.h

ch/

2001-06-10  Gabriel Dos Reis  <gdr@codesourcery.com>

	* decl.c: #include diagnostic.h
	* actions.c: #include diagnostic.h
	* Makefile.in (actions.o): Depend on diagnostic.h
	(decl.o): Depend on diagnostic.h

cp/

2001-06-10  Mark Mitchell <mark@codesourcery.com>
	    Gabriel Dos Reis  <gdr@codesourcery.com>

	* Make-lang.in (cp/call.o): Depend on diagnostic.h
	(cp/typeck.o): Depend on diagnostic.h
	(cp/typeck2.o): Depend on diagnostic.h
	(cp/repo.o): Depend on dignostic.h
	* typeck.c: #include diagnostic.h
	(convert_for_initialization): Remove extern declaration for
	warningcount and errorcount.

	* call.c: #include diagnostic.h
	(convert_like_real): Remove extern declaration for warnincount and
	errorcount.

	* repo.c: #include diagnostic.h
	* typeck2.c: #include diagnostic.h

From-SVN: r43140
2001-06-10 13:48:04 +00:00
Zack Weinberg
1f8875f91d diagnostic.c (vnotice): Kill.
2001-05-23  Zack Weinberg  <zackw@stanford.edu>

	* diagnostic.c (vnotice): Kill.
	(fnotice): Call vfprintf directly.
	(diagnostic_for_decl, output_do_verbatim, output_verbatim,
	verbatim, set_diagnostic_context): Rename string argument to
	indicate that it is run through gettext.
	(vbuild_message_string, build_message_string, output_do_printf):
	Rename string argument to indicate that it is NOT run through
	gettext.
	(output_printf, diagnostic_for_decl, fatal_io_error, sorry,
	output_do_verbatim, set_diagnostic_context, fnotice, _fatal_insn):
	Run msgid argument through gettext.
	(default_print_error_function): Run constant strings through
	gettext when nothing else will.
	(fatal_error, internal_error, error_recursion): Use fnotice.
	Present complete sentences to gettext.

From-SVN: r42498
2001-05-23 17:15:07 +00:00
Richard Henderson
5e7f4a4ab9 mkconfig.sh: Include insn-flags.h.
* mkconfig.sh: Include insn-flags.h.
	* Makefile.in (CONFIG_H): Include insn-flags.h.
	(lots of objects): Remove insn-codes.h and insn-flags.h.

	* alias.c, bb-reorder.c, calls.c, do-loop.c, flow.c, haifa-sched.c,
	integrate.c, jump.c, loop.c, predict.c, profile.c, reg-stack.c,
	regmove.c, reorg.c, a29k/a29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
	avr/avr.c, clipper/clipper.c, convex/convex.c, d30v/d30v.c,
	dsp16xx/dsp16xx.c, fr30/fr30.c, h8300/h8300.c, i370/i370.c,
	i386/i386.c, i860/i860.c, ia64/ia64.c, m32r/m32r.c, m68hc11/m68hc11.c,
	m68k/m68k.c, m88k/m88k.c, mcore/mcore.c, mn10200/mn10200.c,
	mn10300/mn10300.c, ns32k/ns32k.c, pa/pa.c, pdp11/pdp11.c,
	pj/pj.c, romp/romp.c, rs6000/rs6000.c, sh/sh.c, sparc/sparc.c,
	v850/v850.c, vax/vax.c:
	Don't include insn-flags.h.

	* diagnostic.c, expr.h, reload.c, toplev.c:
	Don't include insn-codes.h.

	* builtins.c, combine.c, except.c, explow.c, expmed.c, expr.c,
	final.c, function.c, optabs.c, recog.c, reload1.c, stmt.c,
	c4x/c4x.c, i960/i960.c, mips/mips.c:
	Don't include insn-codes.h or insn-flags.h.

	* genemit.c, genopinit.c, genoutput.c: Don't include insn-codes.h
	or insn-flags.h in the generated code.
	* genflags.c (gen_proto): Use "struct rtx_def *" instead of "rtx".
	(main): Forward declare struct rtx_def.

From-SVN: r40754
2001-03-22 10:48:52 -08:00
Richard Kenner
fce687f876 diagnostic.c (trim_filename): No longer static.
* diagnostic.c (trim_filename): No longer static.
	* toplev.h (trim_filename): Declare.
	* rtl.c (rtl_check_failed_bounds): Call internal_error.
	(rtl_check_failed_type1, rtl_check_failed_type2): Likewise.
	(rtl_check_failed_code1, rtl_check_failed_code2): Likewise.
	(rtvec_check_failed_bounds): Likewise.
	* tree.c (tree_check_failed, tree_class_check_failed): Likewise.

From-SVN: r40016
2001-02-23 16:17:06 -05:00
Gabriel Dos Reis
3d7c9b7e5b diagnostic.c (output_to_stream): Rename to output_buffer_to_stream.
* diagnostic.c (output_to_stream): Rename to
	output_buffer_to_stream. Loses the stream parameter.
	(init_output_buffer): Set diagnosic_buffer's stream.
	(flush_diagnostic_buffer): Adjust.
	(default_print_error_function): Likewise.
	(finish_diagnostic): Likewise.
	(verbatim): Likewise.

	* diagnostic.h (struct output_buffer): Add `stream' field.
	(output_buffer_attached_stream): New macro.

From-SVN: r39999
2001-02-23 17:28:25 +00:00
Richard Kenner
e28a09a451 * diagnostic.c (_fatal_insn): Decrement errorcount.
From-SVN: r39834
2001-02-18 10:17:36 -05:00
Jason Merrill
33c4f1746c diagnostic.c (internal_error): Say "confused" after 1 error, not two.
* diagnostic.c (internal_error): Say "confused" after 1 error, not
        two.  Print file and line with "confused" message.

From-SVN: r39543
2001-02-08 12:18:47 -05:00
Richard Kenner
400500c4a5 diagnostic.h (set_internal_error_function): Renamed.
* diagnostic.h (set_internal_error_function): Renamed.
	* toplev.h (internal_error): Renamed from fatal.
	(pfatal_with_name): Deleted.
	(fatal_io_error): Now has printf-style arguments.
	* diagnostic.c (pfatal_with_name): Deleted.
	(fatal_io_error): Rework to have args in printf-style.
	(set_internal_error_function): Renamed from set_fatal_function.
	(internal_error): Renamed from fatal.
	(error_recursion, fancy_abort): Call internal_error instead of fatal.
	* dwarf2out.c (get_cfa_from_loc_descr): Likewise.
	* emit-rtl.c (gen_realpart, gen_imagpart): Likewise.
	* expr.c (check_max_integer_computation_mode, expand_expr): Likewise.
	* flow.c (verify_flow_info): Likewise.
	* config/arm/arm.c (thumb_unexpanded_epilogue): Likewise.
	* config/mips/mips.c (save_restore_insns): Likewise.
	* cp/init.c (build_java_class_ref): Likewise.
	(dsp16xx_reg_class_from_letter): Likewise.
	(limit_reload_class, double_reg_to_memory): Likewise.
	(print_operand_address, emit_1600_code_shift): Likewise.
	(gen_tst_reg, gen_compare_reg): Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Likewise.
	* cp/decl.c (pushdecl): Likewise.
	* java/check-init.c (check_init): Likewise.
	* java/expr.c (java_lang_expand_expr): Likewise.
	* java/jcf-parse.c (get_constant): Likewise.
	* java/mangle.c (java_mangle_decl): Likewise.
	* java/parse.y (make_nested_class_name, java_complete_lhs): Likewise.
	(operator_string): Likewise.

	* except.c (duplicate_eh_handlers): Call abort instead of fatal.
	* flow.c (verify_flow_info): Likewise.
	* ch/convert.c (convert): Likewise.
	* ch/except.c (pop_handler, chill_check_no_handlers): Likewise.
	* ch/expr.c (chill_expand_expr): Likewise.
	* ch/parse.c (peek_token_, pushback_token, require): Likewise.
	* config/arm/arm.c (thumb_load_double_from_address): Likewise.
	* config/avr/avr.c (pttreg_to_str, unique_section): Likewise.
	(avr_normalize_condition): Likewise.
	* config/c4x/c4x.c (c4x_emit_libcall, c4x_valid_operands): Likewise.
	* config/dsp16xx/dsp16xx.c (dsp16xx_reg_class_from_letter): Likewise.
	(limit_reload_class, double_reg_to_memory): Likewise.
	(print_operand_address, emit_1600_code_shift): Likewise.
	(gen_tst_reg, gen_compare_reg): Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_emit_libcall): Likewise.
	* cp/decl.c (pushdecl): Likewise.
	* java/check-init.c (check_init): Likewise.
	* java/class.c (build_class_ref): Likewise.
	* java/constants.c (write_constant_pool): Likewise.
	* java/decl.c (start_java_method): Likewise.
	* java/expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
	(java_stack_dup, encode_newarray_type): Likewise.
	(build_java_array_length_access): Likewise.
	(build_java_check_indexed_type, expand_java_pushc): Likewise.
	(build_java_soft_divmod, build_invokeinterface): Likewise.
	* java/java-tree.h (INNER_CLASS_P): Likewise.
	* java/jcf-parse.c (parse_signature, get_name_constant): Likewise.
	(give_name_to_class, get_class_constant): Likewise.
	* java/jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
	(find_constant_index, generate_bytecode_conditional): Likewise.
	(generate_bytecode_insns, perform_relocations): Likewise.
	* java/lex.c (java_unget_unicode, java_lex): Likewise.
	* java/mangle.c (mangle_type, mangle_record_type): Likewise.
	(mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
	(finish_mangling): Likewise.
	* java/parse.h (MARK_FINAL_PARMS): Likewise.
	* java/parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
	(obtain_incomplete_type, java_complete_class): Likewise.
	(java_check_regular_methods, java_complete_expand_method): Likewise.
	(cut_identifier_in_qualified, check_deprecation): Likewise.
	(patch_invoke, find_applicable_accessible_methods_list): Likewise.
	(java_complete_lhs, lookup_name_in_blocks): Likewise.
	(check_final_variable_indirect_assignment, build_unaryop): Likewise.
	* java/typeck.c (set_local_type, parse_signature_type): Likewise.
	(parse_signature_string, build_java_signature): Likewise;
	(set_java_signature): Likewise.
	* java/verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.

	* c-parse.in (methoddef): Call fatal_error instead of fatal.
	* objc/objc-act.c (build_ivar_chain): Likewise.
	* cp/except.c (decl_is_java_type): Likewise.
	* cp/init.c (build_java_class_ref): Likewise.
	* cp/init.c (build_new_1): Likewise.
	* f/com.c (ffecom_init_0): Likewise.
	* java/class.c (add_method, build_static_field_ref): Likewise.
	* java/expr.c (build_known_method_ref, expand_invoke): Likewise.
	* java/jcf-parse.c (get_constant, jcf_parse): Likewise.
	* java/lex.c (java_new_new_lexer): Likewise.
	* java/jv-scan.c (main): Likewise.
	(fatal_error): Renamed from fatal.

	* dwarfout.c (dwarfout_init): Call fatal_io_error instead of
	pfatal_with_name.
	* graph.c (clean_graph_dump_file): Likewise.
	* profile.c (init_branch_prob): Likewise.
	* ch/grant.c (write_grant_file): Likewise.
	* ch/lex.c (init_parse, same_file, yywrap): Likewise.
	* f/com.c (init_parse): Likewise.
	* java/jcf-parse.c (yyparse): Likewise.
	* objc/objc-act.c (objc_init): Likewise.

	* java/jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
	(yyparse): Likewise.
	* java/jcf-write.c (make_class_file_name, write_classfile): Likewise.
	* java/lex.c (java_get_line_col): Likewise.

	* hash.c (hash_allocate): Don't check for failure returns from
	obstack functions that can't fail.
	(hash_table_init_n, hash_table_init): Likewise; also now return void.
	* hash.h (hash_table_init_n, hash_table_init): Now return void.
	* cp/decl.c (build_typename_type): hash_table_init now returns void.

	* ch/lang.c (GNU_xref_begin, GNU_xref_end): Deleted.
	* ch/lex.c (convert_bitstring): Delete check for alloca failure.
	* config/dsp16xx/dsp16xx.c (dsp16xx_invalid_register_for_compare):
	Deleted.
	* config/dsp16xx/dsp16xx.md (unnamed cmphi): Call abort instead of it.

	* f/com.c (ffecom_decode_include_option_): Make errors non-fatal.
	* f/lex.c (ffelex_cfelex_, ffelex_get_directive_line_): Likewise.
	(ffelex_hash_): Likewise.
	* config/arm/arm.c (arm_override_options): Likewise.
	* config/avr/avr.c (avr_override_options): Likewise.
	* config/c4x/c4x.c (c4x_expand_prologue): Likewise.
	* config/dsp16xx/dsp16xx.c (function_prologue): Likewise.
	* config/h8300/h8300.c (h8300_init_once): Likewise.
	* config/mips/mips.c (override_options): Likewise.
	* config/i386/i386.c (override_options): Likewise, rework.
	* config/m68k/m68k.c (override_options): Likewise.
	* cp/decl.c (init_decl_processing): Likewise.
	* java/jcf-parse.c (load_class): Likewise.

	* config/dsp16xx/dsp16xx.c (print_operand): Call output_operand_lossage
	instead of fatal.
	* config/mips/mips.c (print_operand): Likewise.

	* java/lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
	* objc/objc_act.c (objc_check_decl): Remove unneeded fatal call.
	(get_object_reference): Likewise.

From-SVN: r39443
2001-02-04 17:44:12 -05:00
Neil Booth
bdda33259f * diagnostic.c (fatal): Fix word wrap.
From-SVN: r39356
2001-01-30 23:47:33 +00:00
Neil Booth
7fa531a6eb * diagnostic.c (fatal): Request preprocessed source.
From-SVN: r39258
2001-01-25 07:39:50 +00:00
Richard Kenner
43db5b3c2c diagnostic.c (finish_abort): Deleted.
Sat Dec 16 10:41:11 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* diagnostic.c (finish_abort): Deleted.
	(fatal): Add code from fninish_abort.
	(error_recursion, fancy_abort): Call fatal, not finish_abort.
	(trim_filename): Remove leading "../".
	* diagnostic.h (finish_abort): Deleted.
	* toplev.c (crash_signal): Call fatal, not finish_abort.

	* stor-layout.c (place_field): Treat overflowing DECL_SIZE_UNIT
	as if size were variable.

	* expmed.c (expand_mult): Write REG_EQUAL note with proper mode.

From-SVN: r38309
2000-12-16 11:23:46 -05:00
Jason Merrill
62c0790555 stor-layout.c (int_mode_for_mode): Handle MODE_VECTOR_INT, MODE_VECTOR_FLOAT.
* stor-layout.c (int_mode_for_mode): Handle MODE_VECTOR_INT,
        MODE_VECTOR_FLOAT.

        * diagnostic.c (report_problematic_module): s/function/module/.

        * c-lex.h: Remove decl for check_newline.

From-SVN: r38003
2000-12-04 12:14:16 -05:00
Phil Edwards
c4765d18f2 diagnostic.c: Fix typos in comments.
2000-12-01  Phil Edwards  <pme@sources.redhat.com>

	* diagnostic.c:  Fix typos in comments.
	* diagnostic.h:  Likewise.

From-SVN: r37923
2000-12-01 19:31:01 +00:00
Zack Weinberg
520a57c81c stringpool.c: New file.
* stringpool.c: New file.
	* ggc-common.c (ggc_mark_string_ptr, ggc_add_string_root): Delete.
	(ggc_alloc_string): Now in stringpool.o.
	* ggc-page.c, ggc-simple.c: Do not define or allocate empty_string.
	* ggc.h: Delete prototype of ggc_add_string_root.  #define
	ggc_add_string_root and ggc_mark_string to nothing.  Prototype
	init_stringpool and stringpool_statistics.
	(ggc_alloc_string): Returns a const char *.
	* tree.c (hash_table, do_identifier_warnings): Delete.
	(init_obstacks): Don't initialize the identifier hash table.
	(get_identifier, maybe_get_identifier, start_identifier_warnings,
	set_identifier_size): Now in stringpool.c.
	* tree.h (struct tree_string): Constify pointer field.
	(approx_sqrt): Prototype.

	* Makefile.in (stringpool.o): Add rule, mention in OBJS.

	* toplev.c (approx_sqrt): New function.
	(compile_file): Call stringpool_statistics if mem_report is on.
	(main): Call init_stringpool.

	* builtins.c (c_strlen), c-decl.c (finish_decl), c-lex.c
	(process_directive), c-typeck.c (constructor_asmspec, struct
	initializer_stack, start_init), except.c (create_rethrow_ref),
	stmt.c (digit_strings), toplev.c (decode_f_option), tree.c
	(built_in_filename), varasm,c (in_named_name,
	assemble_static_space, struct constant_descriptor, struct
	deferred_string, struct pool_constant, force_const_mem),
	i386.c (pic_label_name, global_offset_table_name), rs6000.c
	(rs6000_emit_prologue, rs6000_emit_epilogue) : Constify a char *.

	* c-common.c (combine_strings): Combine strings in scratch
	buffer, then pass to build_string.
	* optabs.c (init_libfuncs), profile.c (init_edge_profiler,
	output_func_start_profiler), stmt.c (init_stmt), alpha.c
	(alpha_need_linkage), arm.c (arm_encode_call_attribute),
	i386.c (load_pic_register), ia64.c (ia64_encode_section_info),
	rs6000.c (rs6000_encode_section_info): Create string in
	scratch buffer, then pass to ggc_alloc_string.

	* stmt.c (expand_asm_operands): If we must adjust the
	constraint strings, do so by creating a new one, not by
	modifying the old one in place.  Constify some char *s.
	* config/pa/pa.c (hppa_encode_label): Drop unnecessary second
	argument.  Create string in scratch buffer, then pass to
	ggc_alloc_string.
	* config/pa/pa-protos.h: Update prototype.
	* config/pa/elf.h, config/pa/pa.h, config/pa/som.h:
	hppa_encode_label takes only one argument.

	* c-parse.in (if_prefix): Find the filename and line number at
	$-2 and $-1 respectively.
	* diagnostic.c (error_recursion): Add missing newline, use
	fputs, translate string.

cp:
	* lex.c (struct impl_files, internal_filename): Constify a char *.
java:
	* jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
	Create string in scratch buffer, then pass to build_string.

From-SVN: r37514
2000-11-17 06:05:31 +00:00
Jason Merrill
ee3400e881 diagnostic.c (finish_abort): New fn.
* diagnostic.c (finish_abort): New fn.
        (fancy_abort, error_recursion): Use it.
        * toplev.c (crash_signal): Likewise.
        * diagnostic.h: Declare it.

        * typeck2.c (friendly_abort): Uncount the error before handing
        off to fancy_abort.

From-SVN: r37480
2000-11-15 10:50:51 -05:00
Joseph Myers
88f3c47786 diagnostic.c (vbuild_message_string, [...]): Add ATTRIBUTE_PRINTF.
* diagnostic.c (vbuild_message_string, output_do_printf, vnotice):
	Add ATTRIBUTE_PRINTF.
	* tradcpp.c (v_message, warning, error, fatal, error_with_line):
	Add ATTRIBUTE_PRINTF*.

java:
	* parse.y (issue_warning_error_from_context): Add
	ATTRIBUTE_PRINTF.

From-SVN: r37419
2000-11-13 13:23:37 +00:00
Joseph Myers
961192e1dd alias.c [...] (init_alias_analysis, [...]): Use memset () instead of bzero ().
* alias.c (init_alias_analysis), calls.c (expand_call,
	emit_library_call_value_1), combine.c (init_reg_last_arrays),
	cse.c (new_basic_block), dbxout.c (dbxout_type), diagnostic.c
	(init_output_buffer, set_diagnostic_context), dwarf2out.c
	(equate_decl_number_to_die, build_abbrev_table), emit-rtl.c
	(init_emit_once), fold-const.c (mul_double, div_and_round_double),
	function.c (assign_parms), gcse.c (compute_can_copy,
	alloc_gcse_mem, alloc_reg_set_mem, record_one_set,
	compute_hash_table, compute_set_hash_table,
	compute_expr_hash_table), genattrtab.c (optimize_attrs), global.c
	(global_alloc, global_conflicts), haifa-sched.c (compute_trg_info,
	clear_units, schedule_block), integrate.c (initialize_for_inline,
	expand_inline_function), jump.c (thread_jumps), local-alloc.c
	(local_alloc), loop.c (combine_movables, count_loop_regs_set,
	load_mems_and_recount_loop_regs_set), print-tree.c (debug_tree),
	regclass.c (init_reg_sets, init_reg_sets_1, regclass,
	record_reg_classes, allocate_reg_info), reload.c
	(get_secondary_mem, remove_address_replacements, find_reloads),
	reload1.c (reload, set_initial_label_offsets, finish_spills,
	reload_as_needed, choose_reload_regs_init,
	reload_cse_simplify_operands), reorg.c (dbr_schedule), sbitmap.c
	(sbitmap_zero), simplify-rtx.c (simplify_plus_minus), ssa.c
	(rename_registers), stmt.c (expand_end_case), unroll.c
	(unroll_loop), varray.c (varray_grow), objc/objc-act.c: Use memset
	() instead of bzero ().

ch:
	* actions.c (check_missing_cases), typeck.c (build_chill_slice,
	build_chill_cast): Use memset () instead of bzero ().

cp:
	* class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
	(push_binding_level), error.c (cp_tree_printer), pt.c
	(process_partial_specialization, tsubst_template_arg_vector),
	search.c (lookup_member): Use memset () instead of bzero ().

java:
	* expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
	(init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
	instead of bzero ().

From-SVN: r37303
2000-11-07 22:50:06 +00:00
Joseph Myers
bf6eb15f68 diagnostic.c: Remove EGCS reference in comment.
* diagnostic.c: Remove EGCS reference in comment.

f:
	* Makefile.in, g77spec.c: Remove EGCS references in comments.

From-SVN: r36996
2000-10-21 19:10:32 +01:00
Richard Henderson
331fe257d6 * diagnostic.c (output_format): Add missing break.
From-SVN: r36739
2000-10-05 18:46:50 -07:00
Gabriel Dos Reis
b5dd2c76f8 diagnostic.h (output_clear_message_text): New function.
* diagnostic.h (output_clear_message_text): New function.
	(output_message_text): New macro.

	* diagnostic.c (clear_text_info): Rename to
	output_clear_message_text.
	(output_clear): Adjust.
	(output_finish): Rename to output_finalize_message.  Tweek.
	(output_to_stream): Adjust.

From-SVN: r36658
2000-09-28 12:50:37 +00:00
Branko Cibej
317639a81c flags.h: Declare warning flag warn_system_headers.
2000-09-25  Branko Cibej  <branko.cibej@hermes.si>

        * flags.h:  Declare warning flag warn_system_headers.
        * toplev.c:  Define it.
        (W_options): Add option -Wsystem-headers.
        * diagnostic.c (count_error): Test warn_system_headers.
        * invoke.texi:  Add description for -Wsystem-headers.
	* cpplib.h (cpp_options): New member warn_system_headers.
	* cpphash.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Don't test
	CPP_IN_SYSTEM_HEADER.
	* cpplib.c (do_import, do_pragma_once): Likewise.
	* cpperror.c (_cpp_begin_message): Test warn_system_headers
	and CPP_IN_SYSTEM_HEADER.
	* cppinit.c (handle_option): Recognize -Wsystem_headers.
	(print_help): Describe -Wsystem_headers.
	* cpplex.c (lex_line): Reorganize condition so that warnings
	about C++ comments in system headers can be enabled. Remove
	label do_line_comment.

From-SVN: r36636
2000-09-25 22:54:04 +00:00
Gabriel Dos Reis
4b40f7588e diagnostic.c (output_last_position): Define.
* diagnostic.c (output_last_position): Define.
	(set_real_maximum_length): Tweek.
	* diagnostic.h (output_last_position): Declare.

From-SVN: r36629
2000-09-25 21:20:19 +00:00
Gabriel Dos Reis
e651302389 toplev.c (display_help): Fix thinko in documentation.
* toplev.c (display_help): Fix thinko in documentation.

	* diagnostic.h (output_buffer::indent_skip): New fields.
	(output_indentation): New macro.

	* diagnostic.c (output_indent): New function.
	(output_set_prefix, clear_diagnostic_info): Use.
	(output_emit_prefix): Predict future indentation.

From-SVN: r36205
2000-09-06 18:43:35 +00:00
Gabriel Dos Reis
2ab99c469c diagnostic.c (finish_diagnostic): Define.
* diagnostic.c (finish_diagnostic): Define.
	(output_do_printf): Use wrap_text instead of output_add_string.
	(default_print_error_function): Avoid embedded '\n'.

	* diagnostic.h (flush_diagnostic_buffer): Declare.

cp/
	* error.c (print_instantiation_context): Don't forget to flush the
	buffer.

From-SVN: r35939
2000-08-24 08:30:02 +00:00
Gabriel Dos Reis
f6a542dece diagnostic.h (output_buffer_state): New macro.
* diagnostic.h (output_buffer_state): New macro.
	* diagnostic.c (diagnostic_for_decl, sorry,
	default_print_error_function, output_do_verbatim,
	report_diagnostic, report_problematic_module): Use it.
	(wrap_text): Tweak.
	(output_format): Use wrap_text instead of maybe_wrap_text.

From-SVN: r35891
2000-08-22 20:20:32 +00:00