Commit Graph

145 Commits

Author SHA1 Message Date
Zack Weinberg 11ad4784f3 tree.h: Forward-declare struct realvaluetype.
* tree.h: Forward-declare struct realvaluetype.
	(struct tree_real_cst): Point to the REAL_VALUE_TYPE, do not
	contain it.
	(TREE_REAL_CST_PTR): New accessor.
	(TREE_REAL_CST): Update.
	* real.h: Include machmode.h.
	(realvaluetype): Make it struct realvaluetype, not a typedef.
	(build_real): Prototype here.

	* tree.c: Include real.h.
	(build_real): Allocate the REAL_VALUE_TYPE as a separate
	object in GC memory, set TREE_REAL_CST_PTR to point to it.
	(build_real_from_int_cst): Use build_real.
	* ggc-common.c (ggc_mark_trees): Mark TREE_REAL_CST_PTR of a
	REAL_CST.

	* builtins.c, c-common.c, c-lex.c, dwarf2out.c, expr.c,
	fold-const.c, print-tree.c, real.c, cp/mangle.c, cp/tree.c,
	f/bld.c, f/com.c, f/expr.c, f/target.c, java/decl.c,
	java/jcf-parse.c, java/parse.y, java/typeck.c: Include real.h.
	* Makefile.in, cp/Make-lang.in, f/Make-lang.in,
	java/Make-lang.in: Update dependency lists.

From-SVN: r53959
2002-05-28 17:33:14 +00:00
Neil Booth e5f3b786ed re PR preprocessor/6517 (gcc hangs on C compile with multiple "-I-")
PR preprocessor/6517
	* Makefile.in: Update.
	* c-common.c (c_common_post_options): Add preprocessor
	errors to the error count.
	* c-lang.c (c_post_options): Kill.
	(LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
	* hooks.h: Add header guards.
	* langhooks-def.h: Include hooks.h.
	(LANG_HOOKS_POST_OPTIONS): Update.
	* langhooks.h (struct lang_hooks): Update post_options.
	* toplev.c (parse_options_and_default_flags): Update.
cp:
	* cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
	* cp-tree.h (cxx_post_options): Kill.
	* cp-lex.c (cxx_post_options): Kill.
objc:
	* objc-lang.c (objc_post_options): Kill.
	(LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.

From-SVN: r53724
2002-05-22 05:40:22 +00:00
Neil Booth a5a49440f7 c-common.c (warn_multichar): New.
* c-common.c (warn_multichar): New.
	(c_common_init): Set CPP's warn_multichar.
	* c-common.h (warn_multichar): New.
	* c-decl.c (warn_multichar): Remove.
	* c-lex.c (lex_charconst): Update.
	* c-tree.h (warn_multichar): Remove.
	* cppexp.c (eval_token): Sign-extend charconst value.
	* cppinit.c (cpp_create_reader): Set warn_multichar.
	* cpplex.c (cpp_interpret_charconst): Don't sign-extend
	each character.  Update prototype.  Sign-extend the result.
	* cpplib.h: Fix conditions.
	(struct cpp_options): Add new warning flag.
	(cpp_interpret_charconst): Update prototype.
cp:
	* Make-lang.in (decl2.o): Update.
	* cp-tree.h (warn_multichar): Remove.
	* decl2.c: Include c-common.h.
	(warn_multichar): Remove.
doc:
	* cpp.texi: Update documentation.
testsuite:
	* gcc.dg/cpp/charconst-3.c: Correct tests accordingly.

From-SVN: r53240
2002-05-06 22:53:10 +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
Richard Henderson ecb0eecefb c-decl.c: Include c-pragma.h.
* c-decl.c: Include c-pragma.h.
        (start_decl, start_function): Invoke maybe_apply_pragma_weak.
        (finish_function): Tidy.
        * c-pragma.c: Include c-common.h.
        (pending_weaks, apply_pragma_weak, maybe_apply_pragma_weak): New.
        (handle_pragma_weak): Use them.
        (init_pragma): Register pending_weaks.
        * c-pragma.h (maybe_apply_pragma_weak): Declare.
        * print-tree.c (print_node): Print DECL_WEAK.
        * varasm.c (mark_weak_decls): Remove.
        (remove_from_pending_weak_list): Remove.
        (add_weak): Remove.
        (asm_emit_uninitialised): Call globalize_decl for weak commons.
        (weak_decls): Make a tree_list.
        (declare_weak): Cons weak_decls directly.
        (globalize_decl): Remove weak_decls elements directly.
        (weak_finish): Simplify weak_decls walk.  Don't weaken unused
        symbols.  Don't pretend to handle aliases.
        (init_varasm_once): Update weak_decls registry.
	* Makefile.in: Update dependencies.

        * cp/decl.c: Include c-pragma.h.
        (start_decl, start_function): Invoke maybe_apply_pragma_weak.
	* cp/Make-lang.in: Update dependencies.

	* gcc.dg/weak-1.c: New.

From-SVN: r50797
2002-03-14 23:11:14 -08:00
Jason Merrill 6f30f1f13c tree.h (TARGET_EXPR_SLOT, [...]): New macros.
* tree.h (TARGET_EXPR_SLOT, TARGET_EXPR_INITIAL): New macros.
        (TARGET_EXPR_CLEANUP): New macro.
cp/
        * except.c: Don't include decl.h or obstack.h.  Do include
        tree-inline.h.
        (build_throw): Destroy temporaries from the thrown
        expression before calling __cxa_throw.  Construct a thrown
        temporary directly into the exception object.
        (stabilize_throw_expr): New function.
        (wrap_cleanups_r): New function.
        * tree.c (stabilize_expr): New function.
        * init.c (build_init): New function.
        * Make-lang.in (cp/except.o): Adjust .h deps.

From-SVN: r50177
2002-02-28 20:49:00 -05:00
Jason Merrill e6b9638bff parse.y (reserved_declspecs): Don't handle attributes.
* parse.y (reserved_declspecs): Don't handle attributes.
        (reserved_typespecquals): Handle them here.
        * Make-lang.in (parse.c): Adjust expected conflicts.

From-SVN: r49678
2002-02-11 10:52:20 -05:00
Alexandre Oliva 1af6141b86 class.c: Include target.h.
* class.c: Include target.h.
(check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
bit-field layout.
* Make-lang.in: Adjust deps.

From-SVN: r49527
2002-02-05 18:01:51 +00:00
Jason Merrill 9780c24faf xref.c: Remove.
* xref.c: Remove.
        * Make-lang.in (CXX_OBJS): Remove cp/xref.o
        (cp/xref.o): Remove dependencies.
        * class.c (finish_struct_1, check_methods): Don't call xref fns.
        (finish_struct_1): Likewise.
        * friend.c (make_friend_class): Likewise.
        * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
        * spew.c (read_process_identifier): Likewise.

From-SVN: r49472
2002-02-04 03:55:43 -05:00
Jason Merrill b88c0704cf Makefile.in (c-parse.c): Handle .output file.
* Makefile.in (c-parse.c): Handle .output file.
        * objc/Make-lang.in (objc-parse.c): Likewise.
        * cp/Make-lang.in (parse.c): Handle .output file.

From-SVN: r49393
2002-02-01 06:48:46 -05:00
Zack Weinberg 7437519c9e Make-lang.in (parse.c): Adjust expected number of shift-reduce conflicts.
* Make-lang.in (parse.c): Adjust expected number of
	shift-reduce conflicts.
	(decl.o): Depend on diagnostic.h.
	* decl.c: Include diagnostic.h.
	(grokdeclarator): Check for null pointer.
	(finish_function): Don't abort when
	current_binding_level->parm_flag != 1, if errors have
	occurred; throw away the statement tree and extra binding
	levels, and continue.
	* lex.c (note_list_got_semicolon): Check for null pointer.
	* method.c (hack_identifier): Just return error_mark_node if
	value is error_mark_node.
	* parse.y (primary: TYPEID(type_id)): No need to use
	TYPE_MAIN_VARIANT here.
	(handler_seq): Accept an empty list of catch clauses and
	generate a fake handler block to avoid later crashes.
	(ansi_raise_identifier): Accept the error token too.
	* semantics.c (begin_class_definition,
	finish_class_definition): Check for error_mark_node.

From-SVN: r49163
2002-01-24 03:27:30 +00:00
Jason Merrill ade3dc07d5 c-common.h (COMPOUND_STMT_BODY_BLOCK): New macro.
* c-common.h (COMPOUND_STMT_BODY_BLOCK): New macro.

        * Make-lang.in (parse.h): Separate rule, just depend on parse.c.

        Use cleanups to run base and member destructors.
        * init.c (push_base_cleanups): New function, split out from...
        (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
        * decl.c (finish_destructor_body): Move vbase destruction code to
        push_base_cleanups.
        (begin_function_body, finish_function_body): New fns.
        (finish_function): Move [cd]tor handling and call_poplevel to
        finish_function_body.
        (pushdecl): Skip the new level.
        * semantics.c (genrtl_try_block): Don't call end_protect_partials.
        (setup_vtbl_ptr): Call push_base_cleanups.
        * method.c (synthesize_method): Call {begin,end}_function_body.
        * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
        * cp-tree.h: Declare new fns.
        * parse.y (function_body, .begin_function_body): New nonterminals.
        (fndef, pending_inline, function_try_block): Use function_body.
        (ctor_initializer_opt, function_try_block): No longer has a value.
        (base_init): Remove .set_base_init token.
        (.set_base_init, compstmt_or_error): Remove.
        * Make-lang.in (parse.c): Expect two fewer s/r conflicts.

From-SVN: r47987
2001-12-13 22:01:59 -05:00
Nathan Sidwell f1880e134c re PR c++/3381 (explicit template instantations fail with absolutely qualified names)
cp:
	PR g++/3381
	* parse.y (named_complex_class_head_sans_basetype): Add new
	reduction.
	* Make-lang.in (parse.c): Adjust expected conflict count.
testsuite:
	* g++.dg/other/scope1.C: New test.
	* g++.dg/template/explicit-instantiation.C: Remove XFAIL

From-SVN: r47546
2001-12-03 12:39:49 +00:00
Joseph Myers d3945f0a4e configure.in (target_list): Add generated-manpages.
* configure.in (target_list): Add generated-manpages.
	* configure: Regenerate.
	* Makefile.in (generated-manpages): Depend on
	lang.generated-manpages.
	* objc/Make-lang.in (objc.generated-manpages): New dummy target.

ada:
	* Make-lang.in (ada.generated-manpages): New dummy target.

ch:
	* Make-lang.in (CHILL.generated-manpages): New dummy target.

cp:
	* Make-lang.in (c++.generated-manpages): New dummy target.

f:
	* Make-lang.in (f77.generated-manpages): New target.
	($(srcdir)/f/g77.1): Don't check $(GENERATED_MANPAGES).  Allow
	manpage generation to fail.
	(f77.info): Don't depend on $(srcdir)/f/g77.1.
	(f77.install-man): Depend on $(GENERATED_MANPAGES) rather than
	directly on $(srcdir)/g77.1.

java:
	* Make-lang.in (java.generated-manpages): New dummy target.

From-SVN: r47442
2001-11-29 16:50:19 +00:00
Richard Kenner ac79cd5ab9 Makefile.in (c-lang.o): Depends on langhooks-def.h.
* Makefile.in (c-lang.o): Depends on langhooks-def.h.
	(expr.o, varasm.o): Depends on langhooks.h.
	* c-common.c (c_safe_from_p): Always declare.
	(c_expand_expr): Refine when declared.
	* c-lang.c (c-common.h): Now include.
	(LANG_HOOKS_SAFE_FROM_P): Define new hook.
	(c_init): Don't set lang_safe_from_expr.
	* expr.c (langhooks.h): Now include.
	(lang_safe_from_p): No longer define.
	(safe_from_p): Use lang hook.
	(expand_expr): Set IGNORE if VOID_TYPE result of VIEW_CONVERT_EXPR too.
	(expand_expr, case VIEW_CONVERT_EXPR): Pass ro_modifier down.
	* expr.h (lang_expand_constant, lang_safe_from_p): Delete.
	* langhooks-def.h (lhd_return_tree, lhd_safe_from_p): New decls.
	(LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
	* langhooks.c (lhd_return_tree, lhd_safe_from_p): New functions.
	* langhooks.h (struct lang_hooks): New fields expand_constant
	and safe_from_p.
	* output.h (output_constant): Size arg is HOST_WIDE_INT.
	* stmt.c (expand_decl_init): No longer need to expand constant
	for CONST_DECL.
	* stor-layout.c (put_pending_size): Don't check for SAVE_EXPR.
	* toplev.c (lang_expand_constant): Delete var.
	* tree.c (save_expr): Don't put another SAVE_EXPR around simple
	operations on SAVE_EXPR.
	* varasm.c (langhooks.h): Now include.
	(compare_constant_1): Use lang_hooks, not lang_expand_constant.
	(record_constant_1, output_addressed_constants): Likewise.
	(initializer_constant_valid_p, output_constant): Likewise.
	(output_constant_def): Process no-defer of string constant.
	(output_addressed_constants, case ADDR_EXPR): Use handled_component_p.
	(output_constant): Strip more conversions.
	Track our size and pad for the rest.
	(array_size_for_constructor): Remove code for non-byte STRING_CST.
	(output_constructor): SIZE now HOST_WIDE_INT.
	* cp/Make-lang.in (cp-lang.o): Depends on c-common.h.
	* cp/cp-lang.c (c-common.h): Include.
	(LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
	* cp/decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
	* cp/expr.c (init_cplus_expand): Don't set lang_expand_constant.

From-SVN: r47376
2001-11-27 09:31:29 -05: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 77bd67cbdd texi2pod.pl: Handle @ifnottex, @iftex and @display.
contrib:
	* texi2pod.pl: Handle @ifnottex, @iftex and @display.  Handle @var
	in verbatim blocks specially.  Handle @unnumbered, @unnumberedsec
	and @center.  Allow [a-z] after @enumerate.  Handle 0 and numbers
	greater than 9 in enumerations.

gcc:
	* Makefile.in (POD2MAN): Don't include --section=1.
	(manext): Rename to man1ext.  All users changed.
	(man7ext): New.
	(man7dir): New.
	(generated-manpages): Also depend on $(docdir)/gfdl.7,
	$(docdir)/gpl.7, and $(docdir)/fsf-funding.7.
	($(docdir)/gcov.1, $(docdir)/cpp.1, $(docdir)/gcc.1): Include
	--section=1 in calls to $(POD2MAN).
	($(docdir)/gfdl.7, $(docdir)/gpl.7, $(docdir)/fsf-funding.7): New.
	(maintainer-clean, install, uninstall): Handle the new man pages.
	($(docdir)/cpp.info, cpp.dvi): Depend on fdl.texi.
	(installdirs): Create man7dir.
	* doc/cpp.texi: Include GFDL in this manual.  In the man page,
	refer to gfdl(7) for the GFDL.  Apply Front Cover and Back Cover
	texts to man page.  Include gpl(7), gfdl(7) and fsf-funding(7) in
	the SEE ALSO man page section.
	* doc/gcov.texi: Apply GFDL to man page.  Include gpl(7), gfdl(7)
	and fsf-funding(7) in the SEE ALSO man page section.
	* doc/invoke.texi: Apply GFDL to man page.  Include gpl(7),
	gfdl(7) and fsf-funding(7) in the SEE ALSO man page section.
	* doc/include/fdl.texi, doc/include/funding.texi,
	doc/include/gpl.texi: Adjust for conversion by texi2pod.pl.
	* doc/.cvsignore: Add gfdl.7, gpl.7 and fsf-funding.7.

gcc/cp:
	* Make-lang.in: Change all uses of $(manext) to $(man1ext).

gcc/f:
	* Make-lang.in: Change all uses of $(manext) to $(man1ext).

From-SVN: r46998
2001-11-14 00:47:47 +00:00
Andreas Franck b21d216c74 configure.in: Add AC_ARG_PROGRAM to support program name transformation with --program-prefix...
* configure.in: Add AC_ARG_PROGRAM to support program name
transformation with --program-prefix, --program-suffix and
--program-transform-name.
* Makefile.in (GCC_INSTALL_NAME, CPP_INSTALL_NAME,
PROTOIZE_INSTALL_NAME, UNPROTOIZE_INSTALL_NAME, GCOV_INSTALL_NAME,
GCCBUG_INSTALL_NAME, GCC_CROSS_NAME, CPP_CROSS_NAME,
PROTOIZE_CROSS_NAME, UNPROTOIZE_CROSS_NAME): Handle
program_transform_name the way suggested by autoconf.
(GCC_TARGET_INSTALL_NAME): Define.
(install-driver): Use the transformed target alias name.


* Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
DEMANGLER_CROSS_NAME): Handle program_transform_name the way
suggested by autoconf.
(GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
(c++.install-common): Use the transformed target alias names.

* Make-lang.in (G77_INSTALL_NAME, G77_CROSS_NAME): Handle
program_transform_name the way suggested by autoconf.

* Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
program_transform_name the way suggested by autoconf.
(java.install-common): Also transform auxiliary program names with
program_transform_name.

From-SVN: r46856
2001-11-08 15:18:18 -05:00
Neil Booth d23c55c28c Clean up langhooks
* alias.c:: Include langhooks.h.
	* emit-rtl.c: Similarly.
	* toplev.c: Similarly.
	* tree-inline.c: Similarly.
	* langhooks-def.h: New, the old langhooks.h.  Give the default
	hooks a common prefix.
	* langhooks.h: Contents extracted from toplev.h.
	* toplev.h: Move langhook stuff to langhooks.h.
	* langhooks.c: Give default hooks a common prefix.

	* c-lang.c: Include langhooks-def.h.
	* ada/misc.c: Similarly.
	* cp/cp-lang.c: Similarly.
	* f/com.c: Similarly.
	* java/lang.c: Similarly.
	* objc/objc-act.c: Similarly.

	* Makefile.in: Update.
	* ada/Makefile.in: Similarly.
	* cp/Make-lang.in: Similarly.
	* f/Make-lang.in: Similarly.
	* java/Make-lang.in: Similarly.
	* objc/Make-lang.in: Similarly.

From-SVN: r46813
2001-11-06 21:12:14 +00:00
Zack Weinberg 5b7874aa2e Makefile.in (INTL_TARGETS, POSUB): Delete all references.
* Makefile.in (INTL_TARGETS, POSUB): Delete all references.
	(INTL_SUBDIRS): Just intl.
	(.SUFFIXES): Add .gmo .po .pox.
	(native): Also depend on build-@POSUB@.
	(intl.all, intl.install): Depend on config.h and things it includes.
	(po-generated): New target; depend on c-parse.c and tradcif.c.
	(install-normal): Also depend on install-@POSUB@.
	(XGETTEXT, GMSGFMT, MSGMERGE, PACKAGE, CATALOGS): New variables.
	(build-, install-, build-po, update-po, install-po,
	.po.gmo, .po.pox, $(PACKAGE).pot, po/$(PACKAGE).pot): New rules.

	* aclocal.m4: Prefix each entry in CATALOGS with "po/"
	* configure.in: Don't munge XGETTEXT.  Don't generate
	po/Makefile.in.
	* configure: Regenerate.

	* exgettext: Delete.
	* config/m68k/m68k.h: Add doc strings for -msky and -mnosky.
	* cp/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Replace
	$(INTL_TARGETS) with po-generated.

po:
	* EXCLUDES: New file.
	* exgettext: New helper script; completely rewritten.
	* Makefile.in.in, POTFILES.in: Delete.

From-SVN: r46680
2001-10-31 17:40:07 +00:00
Alexandre Oliva 19551f2985 Make-lang.in (CXX_OBJS): Added cp-lang.o.
* Make-lang.in (CXX_OBJS): Added cp-lang.o.
(cp/cp-lang.o): New rule.
* cp-tree.h: Declare hooks.
* tree.c: Make hooks non-static.
(init_tree): Don't initialize hooks here.
* lex.c: Likewise.  Move definition of lang_hooks to...
* cp-lang.c: ... new file.

From-SVN: r46095
2001-10-08 20:53:41 +00:00
Alexandre Oliva 25af851255 Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
* Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
(cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
* cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
(TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
(flag_inline_trees): Moved declaration to ../tree-inline.h.
(walk_tree): Moved declaration to ../tree-inline.h.
(walk_tree_without_duplicates, copy_tree_r): Likewise.
(remap_save_expr): Likewise.
* decl.c: Include tree-inline.h.
(lang_mark_tree): Don't mark inlined_fns.
* decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
* optimize.c: Include tree-inline.h.
(optimize_inline_calls): Move declaration to ../tree.h, as
non-static.
(remap_decl): Use language-independent constructs and hooks.
(remap_block, copy_body_r, declare_return_variable): Likewise.
(inlinable_function_p): Likewise.  Don't test for
DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
no longer language-specific.
(optimize_inline_calls): Likewise.  Make it non-static.  Moved
call of dump_function to...
(optimize_function): Here...
(clone_body): New function, extracted from...
(maybe_clone_body): ... here.  Build decl_map locally and pass
it on to clone_body.
* pt.c, semantics.c: Include tree-inline.h.
* tree.c: Likewise.
(cp_walk_subtrees): New language-specific hook for tree inlining.
(cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
cp_is_overload_p, cp_auto_var_in_fn_p,
cp_copy_res_decl_for_inlining): Likewise.
(walk_tree): Move language-specific constructs into...
(cp_walk_subtrees): this new function.
(copy_tree_r): Use language-independent constructs and hooks.
(init_tree): Initialize tree inlining hooks.
(remap_save_expr): Adjust prototype so that the declaration
does not require the definition of splay_tree.

From-SVN: r46020
2001-10-05 02:48:47 +00:00
Zack Weinberg 749ced524c top level:
* errors.h (warning, error, fatal, internal_error): Don't mark
	with ATTRIBUTE_PRINTF_n.
	* toplev.h (internal_error, fatal_io_error, warning, error,
	pedwarn, pedwarn_with_file_and_line, warning_with_file_and_line,
	error_with_file_and_line, sorry, error_for_asm, warning_for_asm):
	Likewise.
cp:
	* Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
	(cp/errfn.o): Delete rule.
	(cp/error.o): Depend on flags.h.
	* errfn.c: Delete file.
	* cp-tree.h: Declare warn_deprecated.  Remove definitions of
	TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
	and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
	cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
	internal_error respectively.  Make cp_deprecated into a macro.
	Don't define cp_printer typedef or declare cp_printers.
	* error.c: Include flags.h.
	Delete: struct tree_formatting_info, print_function_argument_list,
	print_declaration, print_expression, print_function_declaration,
	print_function_parameter, print_type_id, print_cv_qualifier_seq,
	print_type_specifier_seq, print_simple_type_specifier,
	print_elaborated_type_specifier, print_rest_of_abstract_declarator,
	print_parameter_declaration_clause, print_exception_specification,
	print_nested_name_specifier, and definition of cp_printers.
	(locate_error): New function.
	(cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
	rewritten in terms of locate_error and diagnostic.c.
	(cp_tree_printer): Rename cp_printer; wire up to *_to_string
	instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
	(init_error): Adjust to match.
po:
	* POTFILES.in: Remove cp/errfn.c.

From-SVN: r45765
2001-09-24 00:27:33 +00:00
Richard Kenner bb9f8221b4 attribs.c: New file, from c-common.c.
* attribs.c: New file, from c-common.c.
	(attribute_tables): Now four elements.
	(format_attribute_table, lang_attribute_common): New variables.
	(init_attributes): Reflect above changes.
	(handle_mode_attribute): Delete check for wider than uintmax.
	* c-common.c: Delete parts moved to attribs.c.
	(enum attrs): Deleted; unused.
	(c_format_attribute_table): New variable.
	(c_common_lang_init): Initialize format_attribute_table with it.
	* c-common.h (decl_attributes): Remove decl.
	* tree.h (decl_attribute): Move it to here.
	* Makefile.in (C_AND_OBJS_OBJS): Add attribs.o.
	(attribs.o): New rule.
	* ch/Make-lang.in (cc1chill): Add attribs.o.
	* cp/Make-lang.in (CXX_C_OBJS): Add attribs.o.

From-SVN: r45749
2001-09-22 09:14:40 -04:00
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