Commit Graph

17 Commits

Author SHA1 Message Date
Andreas Jaeger 35b1a6faeb c-aux-info.c: Convert to ISO C99.
* c-aux-info.c: Convert to ISO C99.
	* c-pragma.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-convert.c: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-dump.c: Likewise.
	* c-decl.c: Likewise
	* c-format.c: Likewise.
	* c-incpath.c: Likewise.
	* c-incpath.h: Likewise.

From-SVN: r68218
2003-06-19 21:43:59 +02:00
Nathanael Nerode 2bd3ecadd8 c-common.h (c_dump_tree), [...]): Change return type from 'int' to 'bool'.
(gcc)
	* c-common.h (c_dump_tree), c-dump.c (c_dump_tree),
	langhooks-def.h (lhd_tree_dump_dump_tree),
	langhooks.c (lhd_tree_dump_dump_tree), langhooks.h (*dump_tree):
	Change return type from 'int' to 'bool'.  Replace 0 and 1 with
	true and false in return statements.
(cp)
	* dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
	type from 'int' to 'bool'. Replace 0 and 1 with true and false in
	return statements.
(java)
	* lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
	Replace 0 and 1 with true and false in return statements.

From-SVN: r64596
2003-03-19 20:34:10 +00:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Jason Merrill d65b1d77fd c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR.
* c-common.h (RETURN_STMT_EXPR): Rename from RETURN_EXPR.
        * c-common.def: Adjust.
        * c-dump.c (c_dump_tree): Adjust.
        * c-semantics.c (genrtl_return_stmt): Adjust.
        * c-pretty-print.c (pp_c_statement): Adjust.
        * tree-inline.c (copy_body_r): Adjust.

2002-08-22  Jason Merrill  <jason@redhat.com>

        * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
        * semantics.c (nullify_returns_r): Likewise.

From-SVN: r56523
2002-08-22 19:22:53 -04:00
Jason Merrill 558ee214f3 c-dump.c: Resurrect.
* c-dump.c: Resurrect.
        * tree-dump.c: Move C-specific stuff to c-dump.c.
        * c-common.h: Declare c_dump_tree.
        * c-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN): Define.
        * Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o.
        (c-dump.o): New rule.
cp/
        * dump.c (cp_dump_tree): Call c_dump_tree.
        * Make-lang.in (CXX_C_OBJS): Add c-dump.o.

From-SVN: r55776
2002-07-26 09:45:38 -04:00
Bryce McKinlay 89d684bba3 tree-dump.c: Rename from c-dump.c.
* tree-dump.c: Rename from c-dump.c. Include c-tree.h, not c-common.h.
	(lang_type_quals): Declare.
	(dequeue_and_dump): Use lang_hooks.tree_dump.type_quals function to
	retrieve language-specific qualifiers for a type node, instead of
	C_TYPE_QUALS. Likewise for lang_hooks.tree_dump.dump_tree instead of
	lang_dump_tree.
	* tree-dump.h: Rename from c-dump.h.
	* c-common.h (C_TYPE_QUALS): Removed.
	Move declarations for tree-dump.c interface to...
	* tree.h: ... here. Remove lang_dump_tree.
	* langhooks.h (struct lang_hooks_for_tree_dump): New.
	(struct lang_hooks): Add tree_dump hooks.
	* langhooks.c (lhd_tree_dump_dump_tree): New function.
	(lhd_tree_dump_type_quals): New function.
	* langhooks-def.h (lhd_tree_dump_dump_tree, lhd_tree_dump_type_quals):
	Declare.
	(LANG_HOOKS_INITIALIZER): Add tree_dump hooks.
	* Makefile.in: Move tree-dump.o to language-independent back-end.

cp:
	* cp-tree.h (CP_TYPE_QUALS): Removed.
	* decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
	* cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
	LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
	* dump.c (cp_dump_tree): Use void* dump_info argument to match
	lang-hooks prototype.
	* call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
	rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
	CP_TYPE_QUALS changed to cp_type_quals.
	* Make-lang.in: References to c-dump.h changed to tree-dump.h.
	(CXX_C_OBJS): Remove c-dump.o.

From-SVN: r47257
2001-11-22 02:33:02 +00:00
Joseph Myers 684d9f3beb ChangeLog.2, [...]: Fix spelling errors and typos.
* ChangeLog.2, ChangeLog.3, ChangeLog.4, FSFChangeLog.10,
	FSFChangeLog.11, c-common.c, c-common.def, c-common.h, c-decl.c,
	c-dump.c, c-typeck.c, except.c, sdbout.c, simplify-rtx.c,
	timevar.h, tree.h, varasm.c: Fix spelling errors and typos.

From-SVN: r46621
2001-10-29 23:01:45 +00:00
Kazu Hirata 2ba84f36ea c-common.h: Fix comment formatting.
* c-common.h: Fix comment formatting.
	* c-dump.c: Likewise.
	* cfg.c: Likewise.
	* diagnostic.h: Likewise.
	* except.c: Likewise.
	* gcc.h: Likewise.
	* gcov-io.h: Likewise.
	* genattrtab.c: Likewise.
	* output.h: Likewise.
	* predict.h: Likewise.
	* reload1.c: Likewise.
	* reload.h: Likewise.
	* resource.h: Likewise.
	* scan.h: Likewise.
	* system.h: Likewise.
	* tree.h: Likewise.
	* tree-inline.c: Likewise.
	* tsystem.h: Likewise.
	* varasm.c: Likewise.
	* xcoffout.h: Likewise.

From-SVN: r46122
2001-10-09 14:03:13 +00:00
Kaveh R. Ghazi 8b60264b0d builtins.c (expand_builtin_setjmp_receiver): Const-ify.
* builtins.c (expand_builtin_setjmp_receiver): Const-ify.
	* c-common.c (fname_var_t, c_tree_code_type, c_tree_code_length):
	Likewise.
	* c-dump.c (dump_option_value_info): Likewise.
	* c-format.c (format_length_info, format_char_info,
	format_flag_spec, format_flag_pair, format_kind_info): Likewise.
	* collect2.c (names): Likewise.
	* cppdefault.h (default_include): Likewise.
	* cppexp.c (suffix, vsuf_1, vsuf_2, vsuf_3): Likewise.
	* flow.c (life_analysis): Likewise.
	* gcc.c (dir_separator_str, modify_target, option_map,
	target_option_translations, spec_list_1, extra_specs_1,
	init_spec): Likewise.
	* gcov.c (gcov_version_string): Likewise.
	* genattr.c (write_units): Likewise.
	* genattrtab.c (make_length_attrs, write_function_unit_info): Likewise.
	* gengenrtl.c (rtx_definition, defs): Likewise.
	* genrecog.c (pred_table): Likewise.
	* global.c (global_alloc): Likewise.
	* lcm.c (optimize_mode_switching): Likewise.
	* local-alloc.c (find_free_reg): Likewise.
	* params.h (param_info): Likewise.
	* predict.c (predictor_info): Likewise.
	* protoize.c (unexpansion_struct): Likewise.
	* real.c (bmask): Likewise.
	* recog.h (insn_operand_data, insn_data): Likewise.
	* regclass.c (initial_fixed_regs, initial_call_used_regs): Likewise.
	* stmt.c (expand_nl_goto_receiver): Likewise.
	* toplev.c (da, debug_args, lang_opt, documented_lang_options,
	target_switches, target_options): Likewise.
	* tradcif.y (token, tokentab2, yylex): Likewise.
	* tree.h (attribute_spec): Likewise.

	* alpha.c (override_options, alpha_lookup_xfloating_lib_func):
	Likewise.
	* arc.c (arc_output_function_epilogue): Likewise.
	* arm.c (processors, all_cores, all_architectures,
	arm_override_options, isr_attribute_arg, isr_attribute_args,
	arm_isr_value): Likewise.
	* avr.c (mcu_type_s, reg_class_tab, order_regs_for_local_alloc):
	Likewise.
	* c4x.c (c4x_int_reglist): Likewise.
	* d30v.c (override_options): Likewise.
	* h8300.c (shift_insn): Likewise.
	* i386.c (size_cost, i386_cost, i486_cost, pentium_cost,
	pentiumpro_cost, k6_cost, athlon_cost, pentium4_cost, ix86_cost,
	ix86_expand_sse_comi, ix86_expand_sse_compare, override_options,
	builtin_description, bdesc_comi, bdesc_2arg, bdesc_1arg,
	ix86_init_mmx_sse_builtins, ix86_expand_builtin): Likewise.
	* i386.h (processor_costs, ix86_cost): Likewise.
	* m68hc11.c (m68hc11_cost, m6811_cost, m6812_cost): Likewise.
	* m68hc11.h (processor_costs, m68hc11_cost): Likewise.
	* m68k.c (codes_68881, codes_FPA): Likewise.
	* m88k.c (mode_from_align, max_from_align, all_from_align,
	best_from_align, m_options): Likewise.
	* m88k.h (ORDER_REGS_FOR_LOCAL_ALLOC): Likewise.
	* mcore.c (mode_from_align): Likewise.
	* mips/elf64.h (UNIQUE_SECTION): Likewise.
	* mips/iris6gld.h (UNIQUE_SECTION): Likewise.
	* mips.c (mips_sw_reg_names, mips_regno_to_class): Likewise.
	* mips.h (mips_regno_to_class): Likewise.
	* ns32k.c (scales): Likewise.
	* pa.c (import_string, magic_milli): Likewise.
	* rs6000.c (alt_reg_names, rs6000_override_options): Likewise.
	* sparc.c (leaf_reg_remap, sparc_override_options,
	reg_leaf_alloc_order, reg_nonleaf_alloc_order, reg_alloc_orders):
	Likewise.
	* sparc.h (sparc_cpu_select, leaf_reg_remap): Likewise.

cp:
	* class.c (build_vtable_entry_ref): Const-ify.
	* decl.c (predefined_identifier,
	initialize_predefined_identifiers): Likewise.
	* init.c (build_new_1): Likewise.
	* lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
	Likewise.

f:
	* bad.c (_ffebad_message_, ffebad_messages_): Const-ify.
	* bld.c (ffebld_arity_op_): Likewise.
	* bld.h (ffebld_arity_op_): Likewise.
	* com.c (ffecom_init_0): Likewise.
	* intdoc.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
	_ffeintrin_imp_, names, gens, imps, specs, cc_pair,
	cc_descriptions, cc_summaries): Likewise.
	* intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
	_ffeintrin_imp_, ffeintrin_names_, ffeintrin_gens_,
	ffeintrin_imps_, ffeintrin_specs_): Likewise.

java:
	* jcf-io.c (format_uint): Const-ify.
	* lang.c (java_tree_code_type, java_tree_code_length): Likewise.
	* lex.c (java_get_line_col): Likewise.
	* parse.y (build_incdec): Likewise.

From-SVN: r46062
2001-10-07 16:51:11 +00:00
Nathan Sidwell baff6e5433 for some reason this was missed in the
2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>

	* c-common.h (tree_dump_index): Add more comments.
	* c-dump.c (dump_files): Name flags `tree' rather than `ast'.
	(dump_option_value_info): New struct.
	(dump_options): New array.
	(dump_switch_p): Parse switch options symbolically.
	* doc/invoke.texi (-fdump-ast): Rename to ...
	(-fdump-tree): ... here. Document that options are symbolic, and
	not all are applicable.
commit

From-SVN: r45433
2001-09-06 08:53:49 +00: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
Kazu Hirata ec5c56db8b alias.c: Fix comment formatting.
* alias.c: Fix comment formatting.
	* bitmap.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* c-common.c: Likewise.
	* c-decl.c: Likewise.
	* c-dump.c: Likewise.
	* c-lex.c: Likewise.
	* collect2.c: Likewise.
	* combine.c: Likewise.
	* conflict.c: Likewise.
	* cppfiles.c: Likewise.
	* cppinit.c: Likewise.
	* cpplex.c: Likewise.
	* cpplib.c: Likewise.
	* cppmacro.c: Likewise.
	* cppspec.c: Likewise.
	* c-pragma.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* c-semantics.c: Likewise.
	* c-typeck.c: Likewise.

From-SVN: r44547
2001-08-01 17:57:27 +00:00
Nathan Sidwell 6be777481e c-common.h (TDI_inlined): New ast dump phase.
* c-common.h (TDI_inlined): New ast dump phase.
	(dump_flag_name): New function.
	* c-dump.c (dump_files): Add inlined phase.
	(dump_flag_name): Define.
	* doc/invoke.texi (-fdump-ast-inlined): Document.
cp:
	* optimize.c (optimize_inline_calls): New function, broken out
	of ...
	(optimize_function): ... here. Call it. Don't inline if it is
	a thunk.
	(dump_function): Print name of dump flag causing this dump.
	* semantics.c (expand_body): Move thunk inline check to
	optimize_function.

From-SVN: r43687
2001-07-02 12:16:58 +00:00
Nathan Sidwell b7442fb555 c-common.h (flag_dump_translation_unit): Remove.
* c-common.h (flag_dump_translation_unit): Remove.
	(enum tree_dump_index): Define.
	(TDF_ADDRESS, TDF_SLIM): New #defines.
	(dump_node_to_file): Remove.
	(dump_node): Make extern. Add flags.
	(dump_flag, dump_enabled_p, dump_begin, dump_end,
	dump_switch_p): Prototype.
	* c-common.c (flag_dump_translation_unit): Remove.
	* c-decl.c (c_decode_option): Remove -fdump-translation-unit
	logic. Use dump_switch_p.
	* c-dump.h (struct dump_info): Add node and user fields.
	(dump_pointer): Declare.
	* c-dump.c (dump_node): Make extern. Add flags.
	(SOL_COLUMN, EOL_COLUMN, COLUMN_ALIGNMENT): New #defines.
	(dump_new_line, dump_maybe_newline): Use them.
	(dump_pointer): New function.
	(dequeue_and_dump): Check TDF_SLIM before dumping a _DECL's
	chain or function's body. Dump address, if TDF_ADDRESS set.
	(dump_flag): Define.
	(dump_node_to_file): Remove.
	(struct dump_file_info): New struct.
	(dump_files): New array.
	(dump_begin, dump_end, dump_enabled_p, dump_switch_p): Define.
	* c-lang.c (finish_file): Adjust dumping.
	* toplev.h (dump_base_name): Make extern.
	* invoke.texi: Document new flags.
cp:
	* class.c (maybe_indent_hierarchy): New function.
	(dump_class_hierarchy_r): Add flags. Dump extra binfo
	information, if enabled. Use maybe_indent_hierarchy. Adjust
	output format.
	(dump_class_hierarchy): Adjust prototype. Adjust output format.
	(dump_array, dump_vtable, dump_vtt): New functions.
	(finish_struct_1): Adjust hierarchy dumping.
	(initialize_vtable): Call dump_vtable.
	(build_vtt): Call dump_vtt.
	(build_ctor_vtbl_group): Call dump_vtable.
	* decl2.c (flag_dump_class_layout): Remove.
	(cxx_decode_option): Remove dump translation unit
	and dump class hierarchy check. Call dump_switch_p.
	(finish_file): Adjust dumping.
	(dump.c): Only dump base classes if not TDF_SLIM.
	Only dump namespace members if not TDF_SLIM.
	* optimize.c (dump_function): New function.
	(optimize_function): Call dump_function.
	* semantics.c (expand_body): Use dump_enabled_p.

From-SVN: r42896
2001-06-05 08:03:45 +00:00
Mark Mitchell c64539a845 c-dump.c (dequeue_and_dump): Don't look at DECL_ASSEMBLER_NAME if it is not set.
* c-dump.c (dequeue_and_dump): Don't look at DECL_ASSEMBLER_NAME
	if it is not set.

From-SVN: r41788
2001-05-03 15:41:13 +00:00
Mark Mitchell 13507bd80d c-dump.c (dequeue_and_dump): Dump function bodies.
* c-dump.c (dequeue_and_dump): Dump function bodies.

	* dump.c (cp_dump_tree): Don't dump function bodies here.

From-SVN: r37359
2000-11-10 04:50:53 +00:00
Mark Mitchell 0a7394bc1a Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o.
* Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o.
	(c-dump.o): New target.
	* c-common.h (flag_dump_translation_unit): New variable.
	(C_TYPE_QUALS): New macro.
	(strip_array_types): New function.
	(DECL_C_BIT_FIELD): New macro.
	(SET_DECL_C_BIT_FIELD): Likewise.
	(CLEAR_DECL_C_BIT_FIELD): Likewise.
	(dump_info_p): New typedef.
	(dump_tree_fn): Likewise.
	(lang_dump_tree): New variable.
	(dump_node_to_file): New function.
	* c-common.c (flag_dump_translation_unit): Define it.
	(strip_array_types): New function.
	* c-decl.c (c_decode_option): Handle -fdump-translation-unit.
	* c-lang.c (finish_file): Call dump_node_to_file if
	flag_dump_translation_unit.
	* c-semantics.c (mark_rtl_for_local_static): Fix typo in comment.
	* c-tree.h (DECL_C_BIT_FIELD): Remove declaration.
	* c-dump.c: New file.

	* Make-lang.in (CXX_C_OBJS): Add c-dump.o.
	(dump.o): Update dependency list.
	* cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
	(flag_dump_translation_unit): Likewise.
	(CP_TYPE_QUALS): Adjust definition.
	(DECL_C_BIT_FIELD): Remove.
	(SET_DECL_C_BIT_FIELD): Likewise.
	(CLEAR_DECL_C_BIT_FIELD): Likewise.
	(add_maybe_template): Likewise.
	(strip_array_types): Likewise.
	(dump_node_to_file): Likewise.
	(cp_dump_tree): New function.
	* decl.c (init_decl_processing): Set lang_dump_tree.
	* decl2.c (flag_dump_translation_unit): Remove.
	* dump.c: Move most of it to ../c-dump.c.
	(cp_dump_tree): New function.
	* pt.c (add_maybe_template): Remove.
	* typeck.c (strip_array_types): Likewise.

From-SVN: r37358
2000-11-10 04:29:45 +00:00