Commit Graph

121 Commits

Author SHA1 Message Date
Gabriel Dos Reis a1bda5f155 Make-lang.in (cp/error.o): Depend on real.h
* Make-lang.in (cp/error.o): Depend on real.h
        * error.c: #include "real.h"

From-SVN: r45639
2001-09-15 19:47:34 +00:00
Zack Weinberg e78d8e5137 expr.h: Split out optab- and libfunc-related code to...
* expr.h: Split out optab- and libfunc-related code to...
	* optabs.h, libfuncs.h: ... these new headers.

	* Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h.
	(OPTABS_H): New.
	(various .o rules): Add $(OPTABS_H) and/or libfuncs.h to
	dependencies.
	* mkconfig.sh: Don't include insn-codes.h from config.h.

	* reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether
	enum insn_code is available.  Move reload_in_optab and
	reload_out_optab array declarations to optabs.h.
	* regmove.c (gen_add3_insn): Move to optabs.c, export from
	there, prototype in expr.h.
	* gencodes.c: Cleanup: zap global variables, don't use
	printf where puts will do, don't bother defining MAX_INSN_CODE
	which nothing uses, let CODE_FOR_nothing get its value implicitly.

	* genemit.c, genopinit.c: Include optabs.h in generated file.
	* genoutput.c: Include insn-codes.h in generated file.
	* builtins.c, caller-save.c, combine.c, doloop.c, explow.c,
	expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c,
	reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c,
	config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c,
	config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c,
	config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c:
	Include optabs.h.
	* builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c,
	optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c,
	config/m88k/m88k.c, config/sparc/sparc.c:
	Include libfuncs.h.
	* reload.c: Include expr.h and optabs.h before reload.h.
	* config/alpha/alpha.c: Include tree.h before reload.h.
	* config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h,
	and reload.h in that order.
	* config/sparc/sparc.c: Include debug.h.
	* recog.c: Include insn-codes.h.

cp:
	* Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
	* except.c: Include libfuncs.h.
java:
	* Make-lang.in (java/decl.o): Update dependencies.
	* decl.c: Include libfuncs.h, don't include toplev.h.

From-SVN: r44858
2001-08-13 15:56:51 +00:00
Daniel Berlin 1c432a87d9 Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not params.h.
2001-07-20  Daniel Berlin  <dan@cgsoftware.com>

	* Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
	params.h.

2001-07-20  Daniel Berlin  <dan@cgsoftware.com>

	* params.def: Change default max inline insns to 100.

From-SVN: r44203
2001-07-20 19:12:46 +00:00
Neil Booth 2b85879e63 Makefile.in (toplev.o, [...]): Don't depend on dwarfout.h.
* Makefile.in (toplev.o, dwarfout.o, final.o): Don't depend on
	dwarfout.h.
	* dbxout.c (dbxout_function): Rename dbxout_funciton_decl, move
	to conditionally compiled block.
	(dbx_debug_hooks, xcoff_debug_hooks): Update.
	* dbxout.h (dbxout_function): Remove.
	* debug.c (do_nothing_debug_hooks): Update.
	* debug.h (struct gcc_debug_hooks): New hooks function_decl,
	global_decl, deferred_inline_function.
	* dwarf2out.c (dwarf2_debug_hooks): Update.
	(dwarf2out_global_decl): New.
	* dwarfout.c: Don't include dwarfout.h.
	(dwarfout_global_decl, dwarfout_function_decl,
	dwarfout_deferred_inline_function): New.
	(dwarf_debug_hooks): Update.
	* dwarfout.h: Remove.
	* final.c: Don't include dwarfout.h.
	* sdbout.c (sdbout_global_decl): New.
	(sdbout_debug_hooks): Update.
	* toplev.c: Don't include dwarfout.h.
	(check_global_declarations, rest_of_compilation): Use new debug hooks.
	(note_deferral_of_defined_inline_function): Remove.
	* toplev.h (note_deferral_of_defined_inline_function): Remove.
	* ch/Makefile.in (lex.o): No dependence on dwarfout.h.
	* ch/lex.c: Don't include dwarfout.h.
	* cp/Make-lang.in (decl2.o): No dependence on dwarfout.h, dwarf2out.h.
	(semantics.o, optimize.o): Depend on debug.h not dwarfout.h.
	* cp/decl2.c: Don't include dwarfout.h and dwarf2out.h.
	* cp/optimize.c: Include debug.h.
	(maybe_clone_body): Use debug hook.
	* cp/semantics.c: Include debug.h.
	(expand_body): Use debug hook.
	* po/POTFILES.in: Remove dwarfout.h.

From-SVN: r44145
2001-07-19 06:22:04 +00:00
Neil Booth 672a6f42e9 Makefile.in (TARGET_H, [...]): New.
* Makefile.in (TARGET_H, TARGET_DEF_H): New.
	(c-decl.o, tree.o, c-typeck.o, $(out_object_file)): Update.
	* c-decl.c (duplicate_decls): Use function pointer.
	* c-typeck.c (common_type): Similarly.
	* tree.c (valid_machine_attribute): Similarly.
	(merge_machine_type_attributes): Rename merge_type_attributes.
	(merge_machine_decl_attributes): Rename merge_decl_attributes.
	(merge_dllimport_decl_attributes): New function.
	* tree.h (merge_machine_type_attributes): Rename merge_type_attributes.
	(merge_machine_decl_attributes): Rename merge_decl_attributes.
	(merge_dllimport_decl_attributes): New prototype.
	* target.h: New.
	* target-def.h: New.

doc:	(Joseph Myers)
	* doc/gcc.texi, doc/tm.texi: Update documentation.

cp:	Make-lang.in: Update dependencies.
	* spew.c: Include target.h.
	(duplicate_decls): Call target function.
	* decl2.c: include target.h
	(import_export_class): Use existence of target function pointer.
	* typeck.c: Include target.h.
	(qualify_type_recursive): Rename variable.  Call target function.
	(type_after_usual_arithmetic_conversions): Similarly.
	(common_type): Similarly.

config:	* 1750a/1750a.c, a29k/29k.c, alpha/alpha.c, arc/arc.c, arm/arm.c,
	avr/avr.c, c4x/c4x.c, clipper/clipper.c, convex/convex.c,
	d30v/d30v.c, dsp16xx/dsp16xx.c, elxsi/elxsi.c, fr30/fr30.c,
	i370/i370.c, i386/i386.c, i860/i860.c, i960/i960.c, ia64/ia64.c,
	m32r/m32r.c, m68hc11/m68hc11.c, m68k/m68k.c, m88k/m88k.c,
	mips/mips.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, we32k/we32k.c)
	: Include target.h and target-def.h.  Define target.

	* arc/arc-protos.h (arc_valid_machine_decl_attribute): Remove.
	* arc/arc.c (arc_valid_machine_decl_attribute): Rename
	arc_valid_decl_attribute, make static.
	* arc/arc.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	* arm/arm-protos.h (arm_valid_machine_decl_attribute,
	arm_valid_type_attribute_p, arm_pe_valid_machine_decl_attribute,
	arm_pe_merge_machine_decl_attributes): Remove.
	* arm/arm.c (arm_valid_machine_decl_attribute_p): Rename
	arm_valid_decl_attribute_p, make static.
	(arm_pe_valid_decl_attribute_p): Move from pe.c.
	* arm/pe.c (arm_pe_valid_machine_decl_attribute_p): Move to arm.c.
	(arm_pe_merge_machine_decl_attributes): Move to tree.c.
	* arm/arm.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	* arm/coff.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
	* arm/elf.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
	* arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): New.
	(VALID_MACHINE_TYPE_ATTRIBUTE, VALID_MACHINE_DECL_ATTRIBUTE): Remove.
	* avr/avr-protos.h (valid_machine_type_attribute,
	valid_machine_decl_attribute): Remove.
	* avr/avr.c (valid_machine_type_attribute,
	valid_machine_decl_attribute): Rename and make static.
	* avr/avr.h (VALID_MACHINE_TYPE_ATTRIBUTE,
	VALID_MACHINE_DECL_ATTRIBUTE): Remove.
	* c4x/c4x-protos.h (c4x_valid_type_attribute_p): Remove.
	* c4x/c4x.c (c4x_valid_type_attribute_p): Make static.
	* c4x/c4x.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	* d30v/d30v.h: Remove obsolete comments.
	* h8300/h8300-protos.h (h8300_valid_machine_decl_attribute): Remove.
	* h8300/h8300.c (h8300_valid_machine_decl_attribute): Rename, make
	static.
	* h8300/h8300.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
	* i386/cygwin.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
	(i386_pe_merge_decl_attributes, MERGE_MACHINE_DECL_ATTRIBUTES,
	i386_pe_valid_type_attributes_p): Remove.
	* i386/i386-protos.h (ix86_valid_decl_attribute_p,
	ix86_valid_type_attribute_p): Remove.
	* i386/i386.c (ix86_valid_decl_attribute_p): Remove.
	(ix86_valid_type_attribute_p): Make static.
	* i386/i386.h (VALID_MACHINE_DECL_ATTRIBUTE,
	VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	* i386/winnt.c (i386_pe_merge_decl_attributes): Move to tree.c.
	* ia64/ia64-protos.h (ia64_valid_type_attribute): Remove.
	* ia64/ia64.c (ia64_valid_type_attribute): Make static.
	* ia64/ia64.h (VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	* m32r/m32r-protos.h (m32r_valid_machine_decl_attribute): Remove.
	* m32r/m32r.c (m32r_valid_decl_attribute): Make static.
	* m32r/m32r.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
	* m68hc11/m68hc11-protos.h (m68hc11_valid_decl_attribute_p,
	m68hc11_valid_type_attribute_p): Remove.
	* m68hc11/m68hc11.c (m68hc11_valid_decl_attribute_p): Remove.
	(m68hc11_valid_type_attribute_p): Make static.
	* m68hc11/m68hc11.h (VALID_MACHINE_DECL_ATTRIBUTE,
	VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	* mcore/mcore-protos.h (mcore_valid_machine_decl_attribute,
	mcore_merge_machine_decl_attribute): Remove.
	* mcore/mcore.c (mcore_valid_machine_decl_attribute): Rename,
	make static.
	(mcore_merge_machine_decl_attributes): Move to tree.c.
	* mcore/mcore.h (VALID_MACHINE_DECL_ATTRIBUTE,
	VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	(TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define.
	* ns32k/ns32k-protos.h (ns32k_valid_decl_attribute_p,
	ns32k_valid_type_attribute_p): Remove.
	* ns32k/ns32k.c (ns32k_valid_decl_attribute_p): Remove.
	(ns32k_valid_type_attribute_p): Make static.
	* ns32k/ns32k.h (VALID_MACHINE_DECL_ATTRIBUTE,
	VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	* rs6000/rs6000-protos.h (rs6000_valid_decl_attribute_p,
	rs6000_valid_type_attribute_p): Remove.
	* rs6000/rs6000.c (rs6000_valid_decl_attribute_p): Remove.
	(rs6000_valid_type_attribute_p): Make static.
	* rs6000/rs6000.h (VALID_MACHINE_DECL_ATTRIBUTE,
	VALID_MACHINE_TYPE_ATTRIBUTE): Remove.
	* sh/sh-protos.h (sh_valid_machine_decl_attribute): Remove.
	* sh/sh.c (sh_valid_machine_decl_attribute): Rename, make static.
	* sh/sh.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
	* v850/v850-protos.h (v850_valid_machine_decl_attribute): Remove.
	* v850/v850.c (v850_valid_machine_decl_attribute): Rename, make static.
	* v850/v850.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.

From-SVN: r43585
2001-06-26 18:09:27 +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
Mark Mitchell c3aac51278 fdl.texi: New file.
* fdl.texi: New file.
	* c-tree.texi: Use the GFDL.
	* gcc.texi: Likewise.

	* porting.texi: Use the GFDL.

	* objc-features.texi: Use the GFDL.

	* gxxint.texi: Remove.
	* Make-lang.in: Remove all traces of gxxint.texi.

From-SVN: r41700
2001-04-30 22:46:01 +00:00
Kaveh R. Ghazi d6684bc856 Makefile.in (ifcvt.o): Depend on toplev.h.
* Makefile.in (ifcvt.o): Depend on toplev.h.

	* c-semantics.c: Include expr.h.

	* ifcvt.c: Include toplev.h.

	* expr.h (rtx_equal_p): Delete prototype.

	* rtl.h (exact_log2_wide, floor_log2_wide, permalloc,
	protect_from_queue, gen_jump, gen_beq, gen_bge, gen_ble,
	eliminate_constant_term, expand_complex_abs, find_single_use,
	make_tree, init_expr_once, init_optabs, supports_one_only):
	Likewise.

	* tree.h (exact_log2_wide, floor_log2_wide, expand_null_return,
	rest_of_type_compilation, emit_queue, do_pending_stack_adjust,
	expand_assignment, store_expr, emit_line_note_after,
	emit_line_note_force, split_specs_attrs, label_rtx): Likewise.

	* toplev.h (exact_log2_wide, floor_log2_wide): Add prototype.

cp:
	* Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).

	* semantics.c: Include expr.h.

java:
	* Make-lang.in (java/boehm.o): Depend on toplev.h.

	* boehm.c: Include toplev.h.

From-SVN: r41256
2001-04-11 15:51:55 +00:00
Kaveh R. Ghazi 911e61070f Makefile.in (SYSTEM_H): Define.
* Makefile.in (SYSTEM_H): Define.
	Depend on $(SYSTEM_H), not system.h.

	* objc/Make-lang.in: Depend on $(SYSTEM_H), not system.h.

cp:
	* Make-lang.in: Depend on $(SYSTEM_H), not system.h.

f:
	* Make-lang.in: Depend on $(SYSTEM_H), not system.h.

java:
	* Make-lang.in: Depend on $(SYSTEM_H), not system.h.

From-SVN: r40883
2001-03-27 22:57:35 +00:00
Mark Mitchell b850de4faa c-common.h (DECL_NUM_STMTS): New macro.
* c-common.h (DECL_NUM_STMTS): New macro.
	* c-decl.c (duplicate_decls): Copy DECL_NUM_STMTS, not
	DECL_FRAME_SIZE.
	(pushdecl): Likewise.
	* c-semantics.c (add_stmt): Update DECL_NUM_STMTS.
	* integrate.c (expand_inline_function): Don't check
	DECL_FRAME_SIZE.
	* print-tree.c (print_node): Don't print it.
	* toplev.c (rest_of_compilation): Don't try to inline when
	flag_no_inline is on.
	* tree.h (DECL_FRAME_SIZE): Remove.
	(tree_decl): Adjust accordingly.

	* Makefile.in (optimize.o): Depend on params.h.
	(duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
	(init_decl_processing): Set flag_no_inline when doing
	inlining-on-trees.
	* optimize.c: Include params.h.
	(struct inline_data): Improve documentation of FNS.  Add
	FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
	(INSNS_PER_STMT): New macro.
	(remap_block): Use CLONING_P.
	(inlinable_function_p): Don't inline big functions.
	(expand_call_inline): Keep track of how much inlining we've done.
	(optimize_function): Set FIRST_INLINED_FN.
	(maybe_clone_body): Set CLONING_P.
	* semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
	tree nodes.
	(genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
	rest_of_compilation.  Clear DECL_RTL for local variables
	afterwards.
	(clear_decl_rtl): New function.

	* com.c (duplicate_decls): Don't copy DECL_FRAME_SIZE.

	* parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.

From-SVN: r40859
2001-03-27 02:17:48 +00:00
Richard Henderson 94c7f30b44 Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
* Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
        * except.c: Don't include it.

From-SVN: r40753
2001-03-22 10:47:21 -08:00
Zack Weinberg 11642c3a7c configure.in: Prune nonexistent files from build_xm_file, xm_file, and host_xm_file lists.
* configure.in: Prune nonexistent files from build_xm_file,
	xm_file, and host_xm_file lists.  Warn unless they're
	$cpu/xm-$cpu.h.
	Don't generate *config.h here.
	AC_SUBST all variables needed to generate *config.h.
	* configure: Regenerate.
	* mkconfig.sh: New helper script, from code removed from
	configure.in.
	* Makefile.in: Zap all MALLOC variables - no longer used
	anywhere, and malloc.c doesn't exist.
	Substitute in variables needed to generate *config.h.
	Stop lying about the dependencies contained in CONFIG_H and
	GCONFIG_H.
	(HCONFIG_H, TCONFIG_H, TM_P_H): New variables.
	(config.h, hconfig.h, tconfig.h, tm_p.h, cs-config.h,
	cs-hconfig.h, cs-tconfig.h, cs-tm_p.h): New rules.
	(all .o): Add dependencies on $(HCONFIG_H), $(TCONFIG_H),
	$(TM_P_H), etc. as appropriate.

	* config.gcc: Zap references to deleted files.
	* ggc-none.c: Don't include rtl.h or tm_p.h.

	* config/i386/xm-beos.h, config/i386/xm-dgux.h,
	config/i386/xm-djgpp.h, config/i386/xm-dos.h,
	config/i386/xm-gnu.h, config/i386/xm-i386-interix.h,
	config/i386/xm-linux.h, config/i386/xm-linux.h,
	config/i386/xm-next.h, config/i386/xm-openbsd.h,
	config/i386/xm-sun.h, config/i386/xm-sysv3.h:
	Don't include i386/xm-i386.h.

	* config/elxsi/xm-elxsi.h, config/i386/xm-bsd386.h,
	config/i386/xm-i386.h, config/i860/xm-i860.h,
	config/i960/xm-i960.h, config/mcore/xm-mcore.h,
	config/mn10300/xm-mn10300.h, config/ns32k/xm-ns32k.h,
	config/pj/xm-pj.h, config/sh/xm-sh.h, config/v850/xm-v850.h:
	Delete (empty except comments, #includes of other deleted
	files, and macros used nowhere).
cp:
	* Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.

From-SVN: r40350
2001-03-09 20:53:56 +00:00
Jim Meyering e658449ebb Makefile.in (install-common): Don't depend on installdirs here.
gcc/:
2001-01-20  Jim Meyering  <meyering@lucent.com>

        * Makefile.in (install-common): Don't depend on installdirs here.
        Instead, make each of the lang.install-common targets (e.g.,
        c++.install-common in cp/Make-lang.in) depend on it.
	(install-driver): Depend on installdirs.

gcc/ch:
2001-02-15  Jim Meyering  <meyering@lucent.com>

        * Make-lang.in (CHILL.install-common): Depend on `installdirs'.
        (CHILL.install-info): Likewise.

gcc/cp:
2001-02-15  Jim Meyering  <meyering@lucent.com>

        * Make-lang.in (c++.install-common): Depend on installdirs.
        (c++.install-info): Likewise
        (c++.install-man): Likewise

gcc/java:
2001-02-15  Jim Meyering  <meyering@lucent.com>

        * Make-lang.in (java.install-common): Depend on `installdirs'.
        (java.install-info): Likewise.

From-SVN: r39744
2001-02-15 22:54:02 -05:00
Mark Mitchell 8c310e3feb Makefile.in (gcc.o): Fix typos.
2001-02-11  Mark Mitchell  <mark@codesourcery.com>

	* Makefile.in (gcc.o): Fix typos.
	(protize.o): Likewise.
	(unprotoize.o): Likewise.

2001-02-11  Mark Mitchell  <mark@codesourcery.com>

	* Makefile.in (g++spec.o): Fix typo.

From-SVN: r39588
2001-02-11 21:23:42 +00:00
Mark Mitchell 39d6f2e8a5 Makefile.in (s-mlib): Don't build multilibs if --disable-multilib.
* Makefile.in (s-mlib): Don't build multilibs if
	--disable-multilib.
	(DRIVER_DEFINES): Adjust accordingly.
	(gcc.o): Likewise.
	(protoize.o): Likewise.
	(unprotoize.o): Likewise.
	* configure.in: Recognize --enable-multilib.

	* Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.

From-SVN: r39452
2001-02-05 09:48:00 +00:00
Mark Mitchell 049f6ec972 gcc.c (init_gcc_specs): New function.
* gcc.c (init_gcc_specs): New function.  Make -shared-libgcc
	the default when building a shared object.
	(init_spec): Use it.
	* testsuite/lib/g++.exp: Include the directory where libgcc
	is located to the LD_LIBRARY_PATH list.
	* inovke.texi (-shared-libgcc): Document the cases in which

	* Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
	of macros used when compiling g++spec.c.
	* g++spec.c (lang_specific_driver): Link with the shared
	libgcc by default.

From-SVN: r39408
2001-02-02 17:42:00 +00:00
Kaveh R. Ghazi c913b6f18e configure.in: Arrange to include defaults.h in [ht]config.h/tm.h.
* configure.in: Arrange to include defaults.h in [ht]config.h/tm.h.

	* Makefile.in: Remove all dependencies on defaults.h.
	* builtins.c: Don't include defaults.h.
	* c-common.c: Likewise.
	* c-decl.c: Likewise.
	* c-pragma.c: Likewise.
	* c-typeck.c: Likewise.
	* combine.c: Likewise.
	* i386.c: Likewise.
	* frame-ia64.c: Likewise.
	* cppexp.c: Likewise.
	* crtstuff.c: Likewise.
	* dbxout.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* frame-dwarf2.c: Likewise.
	* libgcc2.c: Likewise.
	* optabs.c: Likewise.
	* profile.c: Likewise.
	* sdbout.c: Likewise.
	* toplev.c: Likewise.
	* tradcif.y: Likewise.
	* tree.c: Likewise.
	* varasm.c: Likewise.

ch:
	* Makefile.in: Remove all dependencies on defaults.h.
	* decl.c: Don't include defaults.h.
	* timing.c: Likewise.

cp:
	* Make-lang.in: Remove all dependencies on defaults.h.
	* call.c: Don't include defaults.h.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	* pt.c: Likewise.
	* rtti.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.

f:
	* Make-lang.in: Remove all dependencies on defaults.h.
	* com.c: Don't include defaults.h.

java:
	* Make-lang.in: Remove all dependencies on defaults.h.
	* decl.c: Don't include defaults.h.
	* expr.c: Likewise.
	* parse.y: Likewise.

From-SVN: r39308
2001-01-28 01:50:22 +00:00
Jeffrey Oldham ea4f1fce75 defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the linker supports the init_priority C++ attribute.
gcc/ChangeLog:
2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>

	* defaults.h (SUPPORTS_INIT_PRIORITY): New macro to indicate the
	linker supports the init_priority C++ attribute.
	* tm.texi (SUPPORTS_INIT_PRIORITY): Documentation for new macro.
	* config/mips/iris6.h (SUPPORTS_INIT_PRIORITY): Indicate Irix
	linker does not support init_priority C++ attribute.

gcc/cp/ChangeLog:
2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>

	* tree.c: Add defaults.h
	(cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
	* Make-lang.in (cp/tree.o): Add defaults.h.

From-SVN: r39023
2001-01-15 03:33:56 +00:00
Joseph Myers 1312c143f8 c-common.c: Move format checking code to ...
* c-common.c: Move format checking code to ...
	* c-format.c: ... here.  New file.  Reorder some functions and
	declarations.
	(decl_handle_format_attribute, decl_handle_format_arg_attribute):
	New functions.
	* c-common.h (decl_handle_format_attribute,
	decl_handle_format_arg_attribute): Declare.
	* Makefile.in (C_AND_OBJC_OBJS): Add c-format.o.
	(c-common.o): Adjust dependencies.
	(c-format.o): New list of dependencies.

cp:
	* Make-lang.in (CXX_C_OBJS): Add c-format.o.

From-SVN: r38998
2001-01-13 23:30:02 +00:00
Joseph Myers 23de1fbfd0 Makefile.in (info, [...]): Also build and remove and install and uninstall c-tree.info and cppinternals.info.
* Makefile.in (info, maintainer-clean, install-info, uninstall):
	Also build and remove and install and uninstall c-tree.info and
	cppinternals.info.
	($(srcdir)/gcc.info): Add dependency on contrib.texi.
	($(srcdir)/cppinternals.info): New target.
	* c-tree.texi: Change file name used when makeinfo used without -o
	from ir.info to c-tree.info.  Add info directory entry.
	* cppinternals.texi: Add info directory entry.
	* .cvsignore: Update.

cp:
	* Make-lang.in (c++.info, c++.install-info): Build and install g++
	internals info.
	(c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
	($(srcdir)/cp/g++int.info): New target.
	* gxxint.texi: Add info directory entry.  Use @@ in email address.
	* .cvsignore: Update.

From-SVN: r38970
2001-01-13 00:24:39 +00:00
Jason Merrill 3c8c2a0ae2 typeck.c (strip_all_pointer_quals): Also strip quals from pointer-to-member types.
* typeck.c (strip_all_pointer_quals): Also strip quals from
        pointer-to-member types.

        * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
        parse.y as C.

        * call.c (build_new_method_call): Do evaluate the object parameter
        when accessing a static member.
        * typeck.c (build_component_ref): Likewise.

From-SVN: r38619
2001-01-02 10:20:30 -05:00
Jason Merrill c00996a3ea mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
* mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
        (write_builtin_type): Pass intSI_type_node and the like through
        type_for_mode.
        * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
        Pass intSI_type_node and the like through type_for_mode.
        * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
        * pt.c (tsubst, unify): Likewise.
        * tree.c (walk_tree): Likewise.
        * error.c (dump_type): Likewise.
        (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.

        * Make-lang.in: Tweak top comment for emacs.
        (cp/TAGS): Restore.

        * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.

        * pt.c (tsubst_decl): Call clone_function_decl here.
        (do_decl_instantiation): Not here.
        * class.c (clone_function_decl): Robustify.

        * decl.c (store_bindings): Only search in the non modified
        old_bindings for duplicates.

From-SVN: r37999
2000-12-04 12:00:04 -05:00
Neil Booth 056487e747 Makefile.in: Remove MAYBE_CPPLIB and maybe_cpplib.
* Makefile.in: Remove MAYBE_CPPLIB and maybe_cpplib.
        * c-decl.c: Remove parse_in declaration.
        * c-lang.c: Similarly.
        * c-lex.c: Similarly.
        * c-parse.in: Similarly.
        * c-pragma.c: Similarly.
        * configure.in: Similarly.
        * cp/Make-lang.in: Similarly.
        * cp/spew.c: Similarly.
        * cp/decl2.c: Remove check for lang-c++ option.
        * cp/lang-specs.h: Remove -lang-c++ from cc1plus command line.
        * cp/lex.c (lang_init_options): With cpp_reader_init, default to C++.
        * c-lex.h: Add declaration of parse_in.
        * cppinit.c: Call set_lang after allocating pfile->pending.
        * configure: Regenerate.

From-SVN: r37754
2000-11-26 10:48:50 +00:00
Nick Clifton aac69a49c9 Add support for target specific, language specific object files.
From-SVN: r37726
2000-11-25 00:33:04 +00:00
J"orn Rennecke 9196ece5c2 gcc toplevel:
* Makefile.in (HOST_CFLAGS): Add -DGENERATOR_FILE.
	(rtl.o, print-rtl.o, bitmap.o, obstack.o): Build with -DGENERATOR_FILE.
	(alloca.o, vfprintf.o, ggc-none.o, errors.o): Likewise.
	(splay-tree.o, hash.o): Likewise.
	GCONFIG_H: New.
	(rtl.o, print-rtl.o): Depend on $(GCONFIG_H) instead of $(CONFIG_H).
	(bitmap.o, obstack.o, vfprintf.o, ggc-none.o, errors.o): Likewise.
	(hashtab.o): Likewise.
	(gcov.o): Depend on $(CONFIG_H).
	* configure.in: #include insn-codes.h in tm.h.

	f:

	* Make-lang.in (g77spec.o): Depend on $(CONFIG_H).

	java:

	* Make-lang.in (jvspec.o): Depend on $(CONFIG_H).

	cp:

	* Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).

From-SVN: r37680
2000-11-23 02:22:03 +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
Joseph Myers 436a88a6d4 Makefile.in: Remove all targets related to building distributions and diffs, or INSTALL.
* Makefile.in: Remove all targets related to building
	distributions and diffs, or INSTALL.
	* INSTALL, install1.texi: Remove.
	* configure.in: Remove mention of distdir.
	* configure: Regenerate.
	* objc/Make-lang.in: Remove mention of distdir.

ch:
	* Make-lang.in (CHILL.distdir): Remove.

cp:
	* Make-lang.in (c++.distdir): Remove.

f:
	* Make-lang.in: Remove f77.distdir and f/INSTALL.
	* INSTALL, install0.texi: Remove.

java:
	* Make-lang.in (java.distdir): Remove.

From-SVN: r37265
2000-11-05 10:35:33 +00:00
Zack Weinberg b8dad04b68 configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'.
* configure.in: If not NO_MINUS_C_MINUS_O, substitute
	OUTPUT_OPTION with '-o $@'.  Make zlibdir, zlibinc relative to
	top level.  Kill oldstyle_subdirs.  Do not include
	$srcdir/$s/Makefile.in in all_lang_makefiles, but do include
	$outputs.  Do not run configure.lang from config.status.
	Rearrange warning-flag logic to correspond to what the
	makefile wants.  Put special vax stage1 options in
	@stage1_flags@ not @stage1_warn_cflags@.  Don't do anything
	with extra_c_objs, extra_cxx_objs, or extra_cpp_objs.
	(--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if
	switch is given, nothing otherwise.
	* configure.lang: Delete.

        * Makefile.in: Expunge all traces of extra_c_objs,
        extra_cxx_objs, and extra_cpp_objs.  Set MAYBE_CPPLIB from
        @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS.  Set
        warning options via a three level scheme so that -pedantic and
        -Wtraditional are not used for non-C front ends: LOOSE_WARN,
        STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS ->
        WARN_CFLAGS.  Distinguish STAGE1_CFLAGS from BOOT_CFLAGS.
	Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES.
	Set OUTPUT_OPTION, ZLIB, ZLIBINC.  Do not set P,
        LANG_FLAGS_TO_PASS.  Add OUTPUT_OPTION to all object-file
        generation rules.  Wrap all rules that change the current
        directory in parentheses; pmake doesn't spawn a new shell for
        each command.  Expunge all references to $(P).  When one
        command depends on another and they're run all at once, use &&
        to separate them, not ;.  Add libgcc_s$(SHLIB_EXT) to files
        deleted on make clean.  Force OUTPUT_OPTION='-o $@' in stage2
        and beyond.

	* cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in,
	objc/Make-lang.in: Wrap all rules that change the current
	directory in parentheses.  Expunge all references to $(P).
	When one command depends on another and they're run all at
	once, use && to separate them, not ;.  Add OUTPUT_OPTION to
	all object-file generation rules.  Delete obsolete variables.
	Move all build rules here from the corresponding Makefile.in and
	adapt to the new environment.

	* cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in:
	Delete.

	* cp/config-lang.in, f/config-lang.in, java/config-lang.in:
	Delete outputs= line.

From-SVN: r37088
2000-10-27 20:22:28 +00:00
Richard Henderson 8dc54971c3 Make-lang.in (CXX_EXTRA_HEADERS): Remove.
* Make-lang.in (CXX_EXTRA_HEADERS): Remove.
        (c++ language support bits for libgcc): Remove.
        (c++.clean): Remove cplib2.txt cleanup.
        * config-lang.in (headers, lib2funcs): Remove.

        * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
        * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
        * inc/cxxabi.h, inc/exception, inc/new: Remove files.
        * inc/new.h, inc/typeinfo: Remove files.

From-SVN: r36816
2000-10-09 14:12:45 -07:00
Richard Kenner 9985f21020 Makefile.in (LN): Remove duplicate definition.
* Makefile.in (LN): Remove duplicate definition.
	* cp/Make-lang.in (cplib2.txt): Depend on cp/Makefile.

From-SVN: r36411
2000-09-14 12:49:11 -04:00
Zack Weinberg 0e5921e8a0 Integrated preprocessor.
top level:
	* Makefile.in: Remove all references to c-parse.gperf,
	c-gperf.h, and c-parse.h.  Remove -d from yacc command line
	generating c-parse.c.  Update dependencies.
	* c-parse.gperf, c-gperf.h: Delete.

	* c-common.c: Don't define parse_options, cpp_token, yy_cur,
	yy_lim, or yy_get_token.  Don't define get_directive_line if
	USE_CPPLIB.
	* c-common.h: Add multiple include guard.  Define RID values
	for every keyword in C, C++, and Objective C.  Put all the
	modifiers first.
	(struct c_fileinfo, get_fileinfo, dump_time_statistics): New.
	* c-decl.c (c_decode_option): Handle -lang-objc here.
	(print_lang_identifier): Handle C_IS_RESERVED_WORD case.
	(grokdeclarator): Adjust for new RID scheme.
	(extract_interface_info): New stub.
	* c-lang.c: Don't declare yy_cur or parse_options.
	(lang_init_options): Call cpp_init.  Don't call
	cpp_options_init.
	(lang_init): Don't call check_newline if USE_CPPLIB.

	* c-lex.c: Don't include c-parse.h.  Do include timevar.h.
	Elide lots of unnecessary code if USE_CPPLIB.  Delete code
	rendered unnecessary by new architecture.  Move routines not
	shared with C++ to c-parse.in.  Maintain a local idea of the
	line number.    Handle C++ as well as C.
	[USE_CPPLIB]: Declare and register callbacks for #ident and
	for entering/leaving files.
	(init_c_lex, c_lex): Are now the entry points to this file.
	(check_newline): Break out directive handling to
	process_directive.
	(read_ucs, is_extended_char, utf8_extend_token): Moved here
	from C++ front end.
	(readescape, parse_float): Overhaul.
	(lex_number, lex_string, lex_charconst): Break out of c_lex
	(n'ee yylex).
	(get_fileinfo, update_header_times, dump_one_header,
	dump_time_statistics): New and/or moved here from C++.
	Support per-file data needed by C++ and per-header timing
	statistics (C++ only, at the moment).
	* c-lex.h: Update prototypes.  Add multiple include guard.
	* c-tree.h (struct lang_identifier): Add rid_code field.
	(C_IS_RESERVED_WORD, C_RID_CODE): New.

	* c-parse.in: Include c-pragma.h. Remove unnecesary calls to
	reinit_parse_for_function and/or position_after_white_space.
	(save_filename, save_lineno): Look ahead before saving.
	(label -> identifier ':'): Save file and line before shifting ':'.
	(reservedwords): No need to call get_identifier.
	(init_parse, finish_parse, yyerror, yylex, yyprint,
	make_pointer_declarator): Are now here for C/ObjC.
	(rid_to_yy): Conversion table from RID constants to Yacc codes.

	* c-pragma.c: Rewrite parsing logic to fit with cpplib's
	#pragma registry.  Provide dummy implementation of that
	interface if !USE_CPPLIB.
	* c-pragma.h: Update to match.

	* flags.h: Add multiple include guard.
	(flag_detailed_statistics): Moved here from C++.
	* toplev.c: Define flag_detailed_statistics.

	* gcc.c (C specs): Use %(trad_capable_cpp) for -E|-M|-MM case
	#if USE_CPPLIB.
	* timevar.def (TV_CPP, TV_LEX): New.
	* timevar.h: Add multiple include guard.

	* objc/lang-specs.h: Use %(trad_capable_cpp) for -E|-M|-MM case
	#if USE_CPPLIB.
	* objc/objc-act.c: Don't mention yy_cur or parse_options.
	Initialize cpplib properly.  Force lineno to 0 after first
	call to check_newline.  Don't handle -lang-objc here.
	Move forget_protocol_qualifiers and remember_protocol_qualifiers here.

cp:
	* Make-lang.in, Makefile.in: Remove all references to input.c,
	gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
	* gxx.gperf, hash.h, input.c: Delete.
	* lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
	initialized properly.

	* class.c (fixup_pending_inline): Take a tree, not a
	struct pending_inline *.  All callers changed.
	(init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
	RID_PROTECTED entries in ridpointers[] array here.
	* decl.c (duplicate_decls): Do not refer to struct
	pending_inline.
	(record_builtin_type, init_decl_processing): Use RID_MAX not
	CP_RID_MAX.
	(grokdeclarator): Use C_IS_RESERVED_WORD.
	* decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
	cpplib.
	(grok_x_components): Do not inspect pending_inlines chain.

	* cp-tree.h (struct lang_identifier): Add rid_code entry.
	(C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
	(flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
	(DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
	TIME_IDENTIFIER_FILEINFO): Kill.
	Update prototypes.
	* lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
	single 32-bit word.
	* parse.y: Call do_pending_inlines unconditionally.
	reinit_parse_for_method is now snarf_method.  fn.defpen is no
	longer necessary.  Remove unnecessary <itype> annotation on
	SCOPE.  Do not refer to end_of_file or struct pending_inline.
	* semantics.c (begin_inline_definitions): Call
	do_pending_inlines unconditionally.

	* lex.c: Remove all code now shared with C front end.
	Initialize cpplib properly if USE_CPPLIB.  Put reserved words
	into the get_identifier table.  Rewrite pragma handling to
	work with the registry.  Move code to save tokens for later
	processing to spew.c.

	* spew.c: Rewrite everything in terms of token streams instead
	of text.  Move routines here from lex.c / input.c as
	appropriate.  GC-mark trees hanging off the pending inlines
	chain.

testsuite:
	* g++.old-deja/g++.benjamin/13478.C: Put meaningful tags on
	ERROR markers.
	* g++.old-deja/g++.brendan/crash8.C: Move ERROR marker up one line.
	* gcc.dg/c99-array-nonobj-1.c: Don't expect func[] cases to fail.
	* gcc.dg/wtr-label-1.c: Don't use unconstrained .* in error regexps.
	* gcc.dg/wtr-suffix-1.c: Correct error regexps.
	* gcc.dg/cpp/unc1.c, gcc.dg/cpp/unc2.c, gcc.dg/cpp/unc3.c:
	Preprocess only.
	* gcc.dg/cpp/unc4.c: Adjust line number in dg-error line.
	* gcc.dg/noncompile/const-ll-1.c: Generalize error regexp.

From-SVN: r36216
2000-09-07 00:37:14 +00:00
Mark Mitchell a0c182feaf Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and dyn-string.o.
* Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
	dyn-string.o.
	(CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
	(cp-demangle.o): Remove target.
	(dyn-string.o): Likewise.

From-SVN: r35974
2000-08-25 08:01:13 +00:00
Zack Weinberg a36556a837 [multiple changes]
2000-08-04  Andreas Schwab  <schwab@suse.de>

	* cppmain.c (cb_def_pragma): Skip the first two tokens from the
	token list, which are always `#' and `pragma'.

2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>

	* tree.c (tree_expr_nonnegative_p): Move to...
	* fold-const.c: ... here.  Also handle BIND_EXPR and RTL_EXPR.
	(rtl_expr_nonnegative_p): New.
	* tree.h: Add prototype for rtl_expr_nonnegative_p.

	* real.h (CONST_DOUBLE_LOW, CONST_DOUBLE_HIGH, CONST_DOUBLE_MEM,
	CONST_DOUBLE_CHAIN: Move to...
	* rtl.h: ...here.  Use XCINT/XCEXP.

	* Makefile.in: Remove toplev.o from OBJS.  Add rule to make
	libbackend.a; add libbackend.a to STAGESTUFF.  Add BACKEND
	variable.  Use BACKEND when linking cc1, not OBJS.  Add BACKEND
	to VOL_FILES.

	* objc/Make-lang.in (cc1obj): Link with $(BACKEND).

ch:
	* Make-lang.in (cc1chill): Depend on $(BACKEND), not stamp-objlist.
	* Makefile.in (cc1chill): Link with $(BACKEND).  Define BACKEND,
	eliminate C_OBJS (was commented out), OBJS, OBJDEPS.
cp:
        * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
        * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
        (cc1plus): Link with $(BACKEND) and $(C_OBJS).
f:
	* Make-lang.in (f771): Depend on $(BACKEND), not stamp-objlist.
	* Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
	(f771): Link with $(BACKEND).
java:
	* Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
	* Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
	(jc1): Link with $(BACKEND).
	(jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).

From-SVN: r35501
2000-08-05 00:50:02 +00:00
Ben Chelf f2c5f623b0 Makefile.in (C_AND_OBJC_OBJS): Added c-semantics.o.
2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>

	* Makefile.in (C_AND_OBJC_OBJS): Added c-semantics.o.
	(c-semantics.o): New target.

	* c-common.h (TREE_LANG_FLAG_?): Added documentation.
	(genrtl_do_pushlevel): Moved from cp/cp-tree.h.
	(genrtl_clear_out_block): Likewise.
	(genrtl_goto_stmt): Likewise.
	(genrtl_expr_stmt): Likewise.
	(genrtl_decl_stmt): Likewise.
	(genrtl_if_stmt): Likewise.
	(genrtl_while_stmt): Likewise.
	(genrtl_do_stmt): Likewise.
	(genrtl_return_stmt): Likewise.
	(genrtl_for_stmt): Likewise.
	(genrtl_break_stmt): Likewise.
	(genrtl_continue_stmt): Likewise.
	(genrtl_scope_stmt): Likewise.
	(genrtl_switch_stmt): Likewise.
	(genrtl_case_label): Likewise.
	(genrtl_begin_compound_stmt): Likewise.
	(gerntl_finish_compound_stmt): Likewise.
	(genrtl_compound_stmt): Likewise.
	(genrtl_asm_stmt): Likewise.
	(genrtl_decl_cleanup): Likewise.
	(DECL_ANON_UNION_ELEMS): Likewise.
	(emit_local_var): Likewise.
	(make_rtl_for_local_static): Likewise.
	(expand_cond): Likewise.
	(expand_stmt): Likewise.
	(c_expand_return): Likewise.
	(c_expand_start_case): Likewise.
	(do_case): Likewise.
	(COMPOUND_STMT_NO_SCOPE): Likewise.
	(c_expand_asm_operands): Likewise.
	(NEW_FOR_SCOPE_P): New macro.
	(expand_expr_stmt_fn): New type.

	(set_current_function_name_declared): Likewise.
	(current_function_name_declared): Likewise.
	(lang_expand_stmt): Likewise.
	(stmts_are_full_exprs_p): Likewise.
	(anon_aggr_type_p): Likewise.
	(lang_expand_expr_stmt): Likewise.
	(build_case_label): Likewise.

	* c-decl.c (lang_expand_expr_stmt): Initialize.
	(stmts_are_full_exprs_p): Define.
	(current_function_name_declared): Likewise.
	(do_case): Likewise.
	(lang_expand_stmt): Likewise.
	(set_current_function_name_declared): Likewise.
	(anon_aggr_type_p): Likewise.
	(build_case_label): Likewise.

	* c-semantics.c: New file.
	(expand_cond): Moved from cp/semantics.c.
	(genrtl_do_pushlevel): Likewise.
	(genrtl_clear_out_block): Likewise.
	(genrtl_goto_stmt): Likewise.
	(genrtl_expr_stmt): Likewise.
	(genrtl_decl_stmt): Likewise.
	(genrtl_if_stmt): Likewise.
	(genrtl_while_stmt): Likewise.
	(genrtl_do_stmt): Likewise.
	(genrtl_return_stmt): Likewise.
	(genrtl_for_stmt): Likewise.
	(genrtl_break_stmt): Likewise.
	(genrtl_continue_stmt): Likewise.
	(genrtl_scope_stmt): Likewise.
	(genrtl_switch_stmt): Likewise.
	(genrtl_case_label): Likewise.
	(genrtl_begin_compound_stmt): Likewise.
	(genrtl_finish_compound_stmt): Likewise.
	(genrtl_compound_stmt): Likewise.
	(genrtl_asm_stmt): Likewise.
	(genrtl_decl_cleanup): Likewise.
	(make_rtl_for_local_static): Moved from cp/decl.c.
	(emit_local_var): Likewise.
	(expand_stmt): Define.

	* c-tree.h: (c_expand_asm_operands): Moved to c-common.h.
	(c_expand_return): Likewise.
	(c_expand_start_case): Likewise.

        * cp/Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.

	* cp/Makefile.in (OBJS): Added ../c-semantics.o.
	(OBJDEPS): Likewise.

	* cp/cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
	../c-common.h.
	(struct stmt_tree): Added comment.
	(current_function_name_declared): Removed.
	(stmts_are_full_exprs_p): Likewise.
	(genrtl_do_pushlevel): Likewise.
	(genrtl_clear_out_block): Likewise.
	(COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
	(DECL_ANON_UNION_ELEMS): Likewise.
	(emit_local_var): Likewise.
	(make_rtl_for_local_static): Likewise.
	(do_case): Likewise.
	(expand_stmt): Likewise.
	(genrtl_decl_cleanup): Likewise.
	(c_expand_asm_operands): Likewise.
	(c_expand_return): Likewise.
	(c_expand_start_case): Likewise.

	* cp/decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
	(emit_local_var): Likewise.
	(initialize_local_var): Change reference to
	stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
	Change reference to stmts_are_full_exprs_p to
	current_stmt_tree->stmts_are_full_exprs_p.
	(push_cp_function_context): Likewise.

	* cp/expect.c (expand_throw): Change reference to
	stmts_are_full_exprs_p.

	* cp/init.c (build_aggr_init): Change reference to
	stmts_are_full_exprs_p.
	(build_vec_init): Likewise.

	* cp/optimize.c (maybe_clone_body): Change reference to
	current_function_name_declared to
	cp_function_chain->name_declared.

	* cp/pt.c (instantiate_decl): Change reference to
	current_function_name_declared to
	cp_function_chain->name_declared.

	* cp/semantics.c (expand_cond): Moved declaration to c-common.h.
	(genrtl_do_pushlevel): Moved to c-semantics.c.
	(genrtl_clear_out_block): Likewise.
	(genrtl_goto_stmt): Likewise.
	(genrtl_expr_stmt): Likewise.
	(genrtl_decl_stmt): Likewise.
	(gerntl_if_stmt): Likewise.
	(genrtl_while_stmt): Likewise.
	(genrtl_do_stmt): Likewise.
	(genrtl_return_stmt): Likewise.
	(genrtl_for_stmt): Likewise.
	(genrtl_break_stmt): Likewise.
	(genrtl_continue_stmt): Likewise.
	(genrtl_scope_stmt): Likewise.
	(genrtl_switch_stmt): Likewise.
	(genrtl_case_label): Likewise.
	(genrtl_begin_compound_stmt): Likewise.
	(genrtl_finish_compound_stmt): Likewise.
	(genrtl_compound_stmt): Likewise.
	(genrtl_asm_stmt): Likewise.
	(genrtl_decl_cleanup): Likewise.
	(expand_cond): Likewise.
	(expand_stmt): Renamed to ...
	(lang_expand_stmt): ... this.
	(lang_expand_expr_stmt): Initialize.
	(set_current_function_name_declared): Likewise.
	(stmts_are_full_exprs_p): Likewise.
	(current_function_name_declared): Likewise.
	(anon_aggr_type_p): Likewise.
	(do_poplevel): Change reference to
	stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
	Change reference to stmts_are_full_exprs_p to
	current_stmt_tree->stmts_are_full_exprs_p.
	(add_tree): Likewise.
	(finish_expr_stmt): Likewise.
	(prep_stmt): Likewise.
	(lang_expand_stmt): Likewise.
	(begin_compound_stmt): Change reference to
	current_function_name_declared to
	cp_function_chain->name_declared and call to
	current_function_name_declared().
	(setup_vtbl_ptr): Likewise.
	(genrtl_do_poplevel): Removed.

From-SVN: r34827
2000-07-01 22:23:01 -07:00
Alex Samuel 051664b069 in include/ChangeLog:
* dyn-string.h (dyn_string_init, dyn_string_new,
	dyn_string_delete, dyn_string_release, dyn_string_resize,
	dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
	dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
	dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
	dyn_string_append_char, dyn_string_substring_dyn_string_eq):
	Define as same name with __cxa_ prepended, if IN_LIBGCC2.
	(dyn_string_init, dyn_string_copy, dyn_string_copy_cstr,
	dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
	dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
	dyn_string_append_char, dyn_string_substring): Change return type
	to int.

in libiberty/ChangeLog:

	* cp-demangle.c: Don't include ctype.h.
	(IS_DIGIT): New macro.
	(IS_ALPHA): Likewise.  Use IS_DIGIT and IS_ALPHA throughout
	instead of isdigit and isalpanum.
	(demangling_def): Make name and next const pointers.
	(STATUS_ALLOCATION_FAILED): New status code.
	(dyn_string_append_space): Handle failure in
	dyn_string_append_char.
	(int_to_dyn_string): Likewise.  Change return value to status_t.
	(string_list_new): Handle failure of dyn_string_init.
	(result_close_template_list): Change return type to status_t.
	Handle failure in dyn_string_append.
	(result_push): Change return value to status_t.  Handle failure in
	string_list_new.  Handle failure of result_push throughout.
	(substitution_add): Change return value to status_t.  Handle
	dyn_string failures.  Handle failure of substitution_add
	throughout.
	(template_arg_list_new): Return NULL on allocation failure.
	(result_append_string): Return STATUS_ALLOCATION_FAILED on error.
	Handle error result throughout.
	(result_append): Likewise.
	(result_append_char): Likewise.
	(result_append_space): Likewise.
	(demangling_new): Make argument a const pointer.  Handle
	allocation failures.
	(demangle_template_args): Handle failure in template_arg_list_new
	and result_close_template_list.
	(demangle_discriminator): Return if int_to_dyn_string fails.
	(cp_demangle): Likewise.
	(cp_demangle_type): New function.
	(cplus_demangle_new_abi): Don't call dyn_string_delete.  Abort on
	memory allocation failure.
	(main): Likewise.
	* dyn-string.c (RETURN_ON_ALLOCATION_FAILURE): Define if
	IN_LIBGCC2.
	(dyn_string_init): Change return value to int.  Handle
	RETURN_ON_ALLOCATION_FAILURE case.
	(dyn_string_new): Handle RETURN_ON_ALLOCATION_FAILURE case.
	(dyn_string_release): Delete the dyn_string.
	(dyn_string_resize): Handle RETURN_ON_ALLOCATION_FAILURE case.
	(dyn_string_copy): Change return type to int.
	(dyn_string_copy_cstr): Likewise.
	(dyn_string_prepend): Likewise.
	(dyn_string_prepend_cstr): Likewise.
	(dyn_string_insert): Likewise.
	(dyn_string_insert_cstr): Likewise.
	(dyn_string_append): Likewise.
	(dyn_string_append_cstr): Likewise.
	(dyn_string_append_char): Likewise.
	(dyn_string_substring): Likewise.

in gcc/cp/ChangeLog:

	* Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
	(CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
	(cp-demangle.o): New rule.
	(dyn-string.o): Likewise.
	* inc/cxxabi.h (__cxa_demangle): New declaration.

From-SVN: r34657
2000-06-23 03:58:44 +00:00
Benjamin Chelf d7e7759d8c c-common.h (IF_COND): Moved here from cp/cp-tree.h.
* c-common.h (IF_COND): Moved here from cp/cp-tree.h.
	(THEN_CLAUSE): Likewise.
	(ELSE_CLAUSE): Likewise.
	(WHILE_COND): Likewise.
	(WHILE_BODY): Likewise.
	(DO_COND): Likewise.
	(DO_BODY): Likewise.
	(RETURN_EXPR): Likewise.
	(EXPR_STMT_EXPR): Likewise.
	(FOR_INIT_STMT): Likewise.
	(FOR_COND): Likewise.
	(FOR_EXPR): Likewise.
	(FOR_BODY): Likewise.
	(SWITCH_COND): Likewise.
	(SWITCH_BODY): Likewise.
	(CASE_LOW): Likewise.
	(CASE_HIGH): Likewise.
	(GOTO_DESTINATION): Likewise.
	(COMPOUND_BODY): Likewise.
	(ASM_CV_QUAL): Likewise.
	(ASM_STRING): Likewise.
	(ASM_OUTPUTS): Likewise.
	(ASM_INPUTS): Likewise.
	(ASM_CLOBBERS): Likewise.
	(DECL_STMT_DECL): Likewise.
	(STMT_EXPR_STMT): Likewise.
	(LABEL_STMT_LABEL): Likewise.
	(SCOPE_BEGIN_P): Likewise.
	(SCOPE_END_P): Likewise.
	(SCOPE_STMT_BLOCK): Likewise.
	(SCOPE_NULLIFIED_P): Likewise.
	(SCOPE_NO_CLEANUPS_P): Likewise.
	(SCOPE_PARTIAL_P): Likewise.
	(ASM_VOLATILE_P): Likewise.
	(STMT_LINENO): Likewise.
	(STMT_LINENO_FOR_FN_P): Likewise.

	* c-common.def: Added SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
	ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
	FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
	CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
	SCOPE_STMT, CASE_LABEL, STMT_EXPR.

	* gencheck.c (tree_codes[]): Added '#include "c-common.def"'.

	* cp/cp-tree.h (IF_COND): Move to c-common.h.
	(THEN_CLAUSE): Likewise.
	(ELSE_CLAUSE): Likewise.
	(WHILE_COND): Likewise.
	(WHILE_BODY): Likewise.
	(DO_COND): Likewise.
	(DO_BODY): Likewise.
	(RETURN_EXPR): Likewise.
	(EXPR_STMT_EXPR): Likewise.
	(FOR_INIT_STMT): Likewise.
	(FOR_COND): Likewise.
	(FOR_EXPR): Likewise.
	(FOR_BODY): Likewise.
	(SWITCH_COND): Likewise.
	(SWITCH_BODY): Likewise.
	(CASE_LOW): Likewise.
	(CASE_HIGH): Likewise.
	(GOTO_DESTINATION): Likewise.
	(COMPOUND_BODY): Likewise.
	(ASM_CV_QUAL): Likewise.
	(ASM_STRING): Likewise.
	(ASM_OUTPUTS): Likewise.
	(ASM_INPUTS): Likewise.
	(ASM_CLOBBERS): Likewise.
	(DECL_STMT_DECL): Likewise.
	(STMT_EXPR_STMT): Likewise.
	(LABEL_STMT_LABEL): Likewise.
	(SCOPE_BEGIN_P): Likewise.
	(SCOPE_END_P): Likewise.
	(SCOPE_STMT_BLOCK): Likewise.
	(SCOPE_NULLIFIED_P): Likewise.
	(SCOPE_NO_CLEANUPS_P): Likewise.
	(SCOPE_PARTIAL_P): Likewise.
	(ASM_VOLATILE_P): Likewise.
	(STMT_LINENO): Likewise.
	(STMT_LINENO_FOR_FN_P): Likewise.

	* cp/cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
	ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
	FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
	CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
	SCOPE_STMT, CASE_LABEL, STMT_EXPR.

	* cp/Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.

	* cp/Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
	(cc1plus$(exeext)): Added $(srcdir)/c-common.def.

	* cp/lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
	(cplus_tree_code_length[]): Added '#include "c-common.def"'.
	(cplus_tree_code_name[]): Added '#include "c-common.def"'.

From-SVN: r34552
2000-06-14 10:26:18 -07:00
Maciej W. Rozycki 2d2586a495 Make-lang.in (c++.install-common): Install g++-cross in $(gcc_tooldir)/bin as g++ and c++...
* Make-lang.in (c++.install-common): Install g++-cross in
        $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
        $(target_alias)-g++ and $(target_alias)-c++.

From-SVN: r34527
2000-06-13 15:49:33 -06:00
Alex Samuel 1f6e1acc0f Make-lang.in (CXX_SRCS): Add mangle.c.
* Make-lang.in (CXX_SRCS): Add mangle.c.
	* Makefile.in (CXX_OBJS): Add mangle.o.
	(mangle.o): New rule.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r34394
2000-06-04 21:12:27 +00:00
Alex Samuel 596ea4e574 cp-tree.h (ansi_opname): Make it a macro.
2000-05-27  Alex Samuel    <samuel@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>

	* cp-tree.h (ansi_opname): Make it a macro.
	(ansi_assopname): Likewise.
	(struct lang_decl_flags): Add assignment_operator_p.
	(struct lang_decl): Add operator_code.
	(DECL_VTT_PARM): Adjust.
	(DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
	overloaded operator.
	(SET_OVERLOADED_OPERATOR_CODE): New macro.
	(DECL_ASSIGNMENT_OPERATOR_P): New macro.
	(DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
	(opname_tab): Remove.
	(assignop_tab): Likewise.
	(operator_name_info_t): New type.
	(operator_name_info): New variable.
	(assignment_operator_name_info): Likewise.
	(build_cp_library_fn): Remove declaration.
	(push_cp_library_fn): Likewise.
	(operator_name_string): Likewise.
	(build_decl_overload): Likewise.
	* call.c (print_z_candidates): Simplify.
	(build_object_call): Adjust usage of ansi_opname.  Use
	DECL_OVERLOADED_OPERATOR_P.
	(op_error): Adjust operator name lookup.
	(build_conditional_expr): Adjust usage of ansi_opname.
	(build_new_op): Likewise.
	(build_op_delete_call): Likewise.
	(build_over_call): Likewise.
	(joust): Use DECL_OVERLOADED_OPERATOR_P.
	* decl.c (duplicate_decls): Copy operator_code.
	(init_decl_processing): Adjust parameters to push_cp_library_fn.
	(builtin_function): Adjust parameters to build_library_fn_1.
	(build_library_fn_1): Accept an overloaded operator code.
	(build_library_fn): Pass ERROR_MARK.
	(build_cp_library_fn): Accept an overloaded operator code.
	(push_cp_library_fn): Likewise.
	(grokfndecl): Tweak.
	(grokdeclarator): Simplify code to compute names of overloaded
	operators.  Adjust use of ansi_opname.
	(ambi_op_p): Work on tree_codes, not identifiers.
	(unary_op_p): Likewise.
	(grok_op_properties): Likewise.
	(start_function): Use DECL_OVERLOADED_OPERATOR_P.
	(lang_mark_tree): Don't try to mark the operator_code.
	* decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
	* error.c (dump_decl): Remove special handling for operator
	names.
	(dump_function_name): Likewise.
	(dump_expr): Adjust name lookup of operators.
	(op_to_string): Simplify.
	(assop_to_string): Likewise.
	* init.c (build_new_1): Adjust use of ansi_opname.
	* lex.c (opname_tab): Remove.
	(assignop_tab): Likewise.
	(ansi_opname): Likewise.
	(ansi_assopname): Likewise.
	(operator_name_string): Likewise.
	(reinit_lang_specific): Likewise.
	(operator_name_info): New variable.
	(assignment_operator_name_info): Likewise.
	(init_operators): New function.
	(init_parse): Use it.
	(do_identifier): Adjust use of ansi_opname.
	* method.c (mangle_expression): Don't use ansi_opname for
	mangling.
	(build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
	(build_decl_overload): Remove.
	(build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
	(do_build_assign_ref): Adjust use of ansi_opname.
	(synthesize_method): Likewise.
	(implicitly_declare_fn): Likewise.
	* operators.def: New file.
	* parse.y (operator): Adjust use of ansi_opname.
	* pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
	(set_mangled_name_for_template_decl): Don't play games with
	current_namespace.
	(special_function_p): Adjust use of ansi_opname.
	* typeck.c (check_return_expr): Likewise.
	* Make-lang.in (cc1plus): Depend on operators.def.
	* Makefile.in (lex.o): Likewise.
	(decl.o): Likewise.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r34223
2000-05-28 02:58:19 +00:00
Zack Weinberg 0e7f0e650e * Make-lang.in (cplib2.ready): Eradicate.
From-SVN: r34210
2000-05-27 14:36:52 -07:00
H.J. Lu afa098295d * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
From-SVN: r34047
2000-05-20 11:36:23 +00:00
Jason Merrill 6bed14c7a6 Makefile.in (WARN_CFLAGS): Add -pedantic -Wno-long-long.
* Makefile.in (WARN_CFLAGS): Add -pedantic -Wno-long-long.
        (LOOSE_CFLAGS): New: CFLAGS without -pedantic and -Wtraditional.
        (GCC_CFLAGS): Use it.
        (LANG_FLAGS_TO_PASS): New: SUBDIR_FLAGS_TO_PASS with LOOSE_CFLAGS.
        * cp/Make-lang.in, java/Make-lang.in, f/Make-lang.in, ch/Make-lang.in,
        objc/Make-lang.in: Use it.

From-SVN: r33648
2000-05-03 18:45:31 -04:00
Nathan Sidwell b7b30102a7 vec.cc: New file.
* vec.cc: New file.
	* Make-lang.in (CXX_LIB2FUNCS): Add it.
	(vec.o): Build it.
	* inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
	__cxa_vec_delete): Declare.

From-SVN: r32967
2000-04-06 11:53:30 +00:00
Nathan Sidwell 2854d3c65e cxxabi.h: New header file.
* inc/cxxabi.h: New header file. Define new-abi entry points.
	(__pointer_type_info::target): Rename member to ...
	(__pointer_type_info::type): ... here.
	(__base_class_info::type): Rename member to ...
	(__base_class_info::base): ... here.
	* Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
	* cp-tree.h (CPTI_ABI): New global tree enumeration.
	(abi_node): New global tree node.
	* decl.c (abi_node): Document.
	(init_decl_processing): Initialize abi_node.
	* rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
	(get_vmi_pseudo_type_info): Likewise.
	(create_tinfo_types): Likewise.
	(emit_support_tinfos): Likewise.
	* tinfo.h (cxxabi.h): Include for new-abi.
	Move rtti class definitions to new header file.
	* tinfo.cc (abi): Use the namespace.
	(std): Move new abi rtti classes from here ...
	(__cxxabiv1): ... to here.
	* tinfo2.cc (cxxabi.h): Include for new-abi.
	Move rtti class definitions to new header file.
	(std): Move new abi rtti classes from here ...
	(__cxxabiv1): ... to here.
	* inc/typeinfo (__class_type_info): Move into __cxxabiv1
	namespace.

From-SVN: r32669
2000-03-21 16:12:25 +00:00
Jason Merrill 1660cb3ac4 lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
* lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
        * cp-tree.h: Declare flag_enforce_eh_specs.
        * decl.c (store_parm_decls, finish_function): Check it.

        C library functions don't throw.
        * Makefile.in (cfns.h): New target.
        (except.o): Depend on it.
        * Make-lang.in (cc1plus): Depend on cfns.gperf.
        * cfns.gperf: New file.
        * cfns.h: Generated.
        * except.c: Include it.
        (nothrow_libfn_p): New fn.
        * decl.c (grokfndecl): Use it.
        * cp-tree.h: Declare it.

From-SVN: r32469
2000-03-10 06:56:00 -05:00
Richard Kenner ca888935f5 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
From-SVN: r32204
2000-02-26 19:52:00 -05:00
Zack Weinberg f95e46b994 Makefile.in (STMP_FIXINC): New toggle.
* Makefile.in (STMP_FIXINC): New toggle.
	(LIBGCC2_DEPS): Delete all references.
	(stmp-headers): Delete target.  All references either deleted
	or changed to stmp-int-headers.
	(all.cross): Don't depend on stmp-headers or STMP_FIXPROTO.
	(LIBCPP_OBJS): Take out cppalloc.o.
	(cppalloc.o): Delete target.
	(stmp-int-hdrs): Depend on $(STMP_FIXINC).
	(gen-protos, fix-header): Link with libiberty.a.
	* build-make: Don't change FIXINCLUDES.  Override STMP_FIXINC
	to empty.
	* cp/Make-lang.in: Delete refs to LIBGCC2_DEPS.

	* configure.in: Remove refs to strerror.
	* acconfig.h: Take out NEED_DECLARATION_STRERROR.
	* system.h: Take out strerror stanza.

	* cpperror.c (my_strerror): Delete function.
	(cpp_error_from_errno, cpp_notice_from_errno): Use xstrerror.
	* cppmain.c (main): Call xmalloc_set_program_name first thing.
	* cppalloc.c: Delete file.
	* gen-protos.c: Don't provide xrealloc.

	* fixinc/fixincl.c, fixinc/fixlib.c, fixinc/procopen.c: Use
	xstrerror throughout.

From-SVN: r32200
2000-02-27 00:10:15 +00:00
Kaveh R. Ghazi 4746ee266f configure (gcc_version): When setting, narrow search to lines containing `version_string'.
* configure (gcc_version): When setting, narrow search to
	lines containing `version_string'.

gcc:
	* version.c: Include gansidecl.h and version.h.

	* version.h: Wrap entire file in macro __GCC_VERSION_H__.

	* configure.in (gcc_version): When setting, narrow search to
	lines containing `version_string'.

	* Makefile.in (mainversion): Likewise.
	(GCC_H): New variable.
	(gcc.h): Delete target.
	(gcc.o, gccspec.o, cppspec.o): Depend on $(GCC_H), not gcc.h.
	(version.o): Depend on version.h.
	(dbxout.o): Don't depend on gcc.h.

gcc/cp:
	* Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.

gcc/f:
	* Make-lang.in (g77spec.o): Depend on $(GCC_H), not gcc.h.

gcc/java:
	* Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.

libf2c:
	* configure.in (gcc_version): When setting, narrow search to
	lines containing `version_string'.

From-SVN: r32009
2000-02-16 16:22:47 +00:00
Nathan Sidwell eeb109f2cf g++spec.c (lang_specific_driver): Add -fnew-abi if ENABLE_NEW_GXX_ABI defined.
* g++spec.c (lang_specific_driver): Add -fnew-abi if
	ENABLE_NEW_GXX_ABI defined.
	* Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
	opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
	opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.

From-SVN: r31388
2000-01-13 15:37:03 +00:00
Mark Mitchell 46e8c075d0 Make-lang.in (CXX_SRCS): Add optimize.c.
1999-11-25  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (CXX_SRCS): Add optimize.c.
	* Makefile.in (CXX_OBJS): Add optimize.o.
	(CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
	(spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
	(class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
	(search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
	(xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
	(dump.o): Likewise.
	(optimize.o): New target.
	* class.c: Don't include splay-tree.h.
	* cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
	* cp-tree.h: Include splay-tree.h.
	(DECL_UNINLINABLE): New macro.
	(CTOR_BEGIN_P, CTOR_END_P): New macros.
	(flag_inline_trees): New variable.
	(local_variable_p): New function.
	(nonstatic_local_decl_p): Likewise.
	(optimize_function): Likewise.
	(cplus_unsave_expr_now): Remove.
	(copy_tree_r): Declare.
	(remap_save_expr): Likewise.
	* decl.c (local_variable_p): Don't
	make it static.
	(local_variable_p_walkfn): New function.
	(make_rtl_for_local_static): Remove code to try to avoid writing
	out static constants.
	(emit_local_var): Fix indentation.
	(nonstatic_local_decl_p): New function.
	(check_default_argument): Use local_variable_p_walkfn, not
	local_variable_p, when walking the tree.
	(start_function): Set the DECL_CONTEXT for automatically generated
	labels.
	(finish_constructor_body): Use CTOR_STMT to mark the end of a
	constructor.
	* decl2.c: Don't include splay-tree.h.
	(flag_inline_trees): Define.
	* dump.c: Don't include
	splay-tree.h.
	* except.c (expand_end_catch_block): Fix comment formatting.
	(expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
	(expand_throw): Tidy comment.
	* init.c (build_vec_delete_1): Use create_temporary_var.
	* lex.c (cplus_tree_code_type): Make it static.
	(cplus_tree_code_length): Likewise.
	(cplus_tree_code_name): Likewise.
	* optimize.c: New file.
	* semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
	with computed gotos.
	(setup_vtbl_ptr): Mark the beginnings of constructors with
	CTOR_STMT.
	(expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
	(expand_body): Call optimize_function.  Save bodies if we're doing
	inlining on trees.
	* tree.c: Don't include splay-tree.h.  Include insn-config.h and
	integrate.h.
	(copy_tree_r): Make it public.
	(statement_code_p): New function.
	(mark_local_for_remap_r): Likewise.
	(cp_usave_r): Likewise.
	(cp_unsave): Likewise.
	(build_cplus_new): Set DECL_CONTEXT for temporary variables.
	(walk_tree): Walk into `s' class nodes.  Walk statement chains.
	(copy_tree_r): Handle 's' class nodes.  Restore chains for
	statements.  Nullify scopes.  Don't copy types.
	(init_tree): Set lang_unsave to cp_unsave.
	(remap_save_expr): Define.
	* ir.texi: Document CTOR_STMT.

From-SVN: r30669
1999-11-25 20:32:04 +00:00