Commit Graph

205 Commits

Author SHA1 Message Date
Kelley Cook 03787dfd81 re PR bootstrap/12744 (A GCC release tarball can no longer be built without bison/flex)
gcc/
2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>

	PR bootstrap/12744
	* configure.in: Revamp enable-generated-files-in-srcdir rule to define
	GENINSRC and not parsedir.  Define srcextra as a langhook.
	* configure: Regenerate.
	* Makefile.in: Suppress default .l.c rule.  Don't substitute
	parsedir and delete all references throughout.  Conditionally define
	rule for srcextra dependent on GENINSRC.
	(stmp-docobjdir): Delete.
	(c-parse.o, gengtype-lex.o, gengtype-yacc.o): Use implicit build rule.
	(srcextra): Copy c-parse.y, c-parse.c, gengtype-lex.c, gengtype-yacc.c,
	and gengtype-yacc.h back to source directory.
	(maintainer-clean): Delete all parse files in source directory.
	(distclean): Delete generated files.

	* objc/Make-lang.in (objc-parse.o): Use implicit build rule.
	(objc-parse.c, objc-parse.y): Don't use parsedir.
	(objc.srcextra): Copy objc-parse.y and objc-parse.c back to source
	directory if requested.
	(po-generated): Don't use parsedir.
	(objc.maintainer-clean): Delete above files from source directory.

gcc/ada/
2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (ada.srcextra): Dummy entry.

gcc/cp/
2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (c++.srcextra): Dummy entry.

gcc/f/
2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (f77.srcextra): Dummy entry.

gcc/java/
2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
	(java.srcextra): Copy above back to source directory if requested.
	(po-generated): Delete reference to $(parsedir).
	(java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
	Use implicit rule.

gcc/treelang/
2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (TREE_GENERATED): Delete reference to $(parsedir).
	(treelang/parse.o, treelang/lex.o): Look for sources in build
	directory.  Use implicit rule.
	(treelang/parse.c, treelang/parse.h treelang/lex.c): Always build in
	doc directory.
	(treelang.srcextra): Copy above back to source directory if requested.

From-SVN: r75903
2004-01-15 04:02:24 +00:00
Nathanael Nerode c90501d0fd re PR bootstrap/7817 (Link to gcc man page in g++ man page incorrect)
PR bootstrap/7817
	* Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.

From-SVN: r75620
2004-01-10 01:30:39 +00:00
Kelley Cook 58416236dc Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1.
2003-12-17  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1.

From-SVN: r74766
2003-12-18 00:51:26 +00:00
Kelley Cook 439020ecbc Makefile.in (program_transform_cross_name): Delete.
gcc/
2003-12-05  Kelley Cook  <kcook@gcc.gnu.org>

	* Makefile.in (program_transform_cross_name): Delete.
	(GCC_CROSS_NAME, CPP_CROSS_NAME): Delete.
	(PROTOIZE_CROSS_NAME, UNPROTOIZE_CROSS_NAME): Delete.
	(AR_FOR_TARGET, RANLIB_FOR_TARGET, NM_FOR_TARGET): Adjust for above.
	(install_cpp, install_driver, install-man, uninstall): Likewise.

gcc/cp
2003-12-05  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
	(c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
	(c++.uninstall): Likewise.

gcc/f
2003-12-05  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (G77_CROSS_NAME): Delete.
	(g77.install_common, g77.install-man, g77.uninstall): Adjust for above.

gcc/java
2003-12-05  Kelley Cook  <kcook@gcc.gnu.org>

	* Make-lang.in (GCJ_CROSS_NAME): Delete.
	(java.install_common, java.install-man): Adjust for above.
	(java.uninstall): Likewise.

From-SVN: r74365
2003-12-06 13:13:20 +00:00
Joseph Myers a03ad584d6 Makefile.in (extraclean): Delete.
gcc:
	* Makefile.in (extraclean): Delete.
	* configure.in (target_list): Remove extraclean.
	* configure: Regenerate.
	* doc/makefile.texi, doc/sourcebuild.texi: Update.
	* objc/Make-lang.in (objc.extraclean): Delete.

gcc/ada:
	* Make-lang.in (ada.extraclean): Delete.

gcc/cp:
	* Make-lang.in (c++.extraclean): Delete.

gcc/f:
	* Make-lang.in (f77.extraclean): Delete.

gcc/java:
	* Make-lang.in (java.extraclean): Delete.

gcc/treelang:
	* Make-lang.in (treelang.extraclean): Delete.

From-SVN: r73759
2003-11-20 10:08:56 +00:00
Joseph Myers 49a4172630 Makefile.in (lang_checks): Add.
gcc:
	* Makefile.in (lang_checks): Add.
	(check-c++, check-f77, check-java, check-g++, check-g77,
	check-objc): Remove hardcoded targets.
	* doc/sourcebuild.texi: Document testsuite hooks.
	* objc/Make-lang.in (check-objc, lang_checks): Add.

gcc/cp:
	* Make-lang.in (check-g++, lang_checks): Add.

gcc/f:
	* Make-lang.in (check-f77, lang_checks): Add.

gcc/java:
	* Make-lang.in (check-java): Add.

gcc/treelang:
	* Make-lang.in: Remove obsolete comment.

From-SVN: r73758
2003-11-20 09:59:59 +00:00
Jason Merrill 7d60db051a Makefile.in, [...]: Create TAGS.sub files in each directory and TAGS files that include them for...
* Makefile.in, objc/Make-lang.in, ada/Make-lang.in, cp/Make-lang.in,
        java/Make-lang.in, f/Make-lang.in: Create TAGS.sub files in each
        directory and TAGS files that include them for each front end.

From-SVN: r73643
2003-11-16 01:17:21 -05:00
Mark Mitchell 97ae108d14 Makefile.in (install-info): Simplify.
* Makefile.in (install-info): Simplify.
	($(DESTDIR)$(infodir)/%.info): New rule.
	* configure.in (target_list): Remove install-info.
	* doc/.cvsignore (gcc.info*): Remove.
	(gccint.info*): Likewise.
	(gccinstall.info*): Likewise.
	(cpp.info*): Likewise.
	(cppinternals.info*): Likewise.
	(*.info*): Add it.
	* doc/sourcebuild.texi: Update description of install-info.
	* objc/Make-lang.in (objc.install-info): Remove.

2003-10-20  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (ada.install-info): Remove target.
	(info): New target.
	(install-info): Likewise.
	(gnat_ug_unx.info): Simplify rule.
	(gnat_ug_vmx.info): Likewise.
	(gnat_ug_vxw.info): Likewise.
	(gnat_ug_wnt.info): Likewise.
	(gnat_rm.info): Likewise.
	(gnat-style.info): Likewise.

2003-10-20  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (c++.install-info): Remove.

Mon Oct 20 13:49:43 2003  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (.PHONY): Remove f77.info, f77.install-info.
	(info): Update dependencies.
	($(srcdir)/f/g77.info): Replace with ...
	($(docobjdir)/g77.info): ... this.
	(f77.install-info): Remove.
	(install-info): New target.

2003-10-20  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (info): Update dependencies.
	(java.install-info): Remove.
	($(srcdir)/java/gcj.info): Replace with ...
	($(docobjdir)/gcj.info): ... this.

2003-10-20  Mark Mitchell  <mark@codesourcery.com>

	* Make-lang.in (info): Use docobjdir.
	($(srcdir)/treelang/treelang.info): Replace with ...
	($(docobjdir)/treelang/treelang.info): ... this.
	(install-info): New target.

From-SVN: r72718
2003-10-20 20:58:26 +00:00
Gabriel Dos Reis a5e6b29b07 Breack out decl.c (3/n)
Breack out decl.c (3/n)
	* name-lookup.c: Include flags.h
	(lookup_name_current_level): Make static.
	(add_decl_to_level): Likewise.
	(push_local_binding): Likewise.
	(push_overloaded_decl): Likewise.
	(lookup_using_namespace): Likewise.
	(qualified_lookup_using_namespace): Likewise.
	(lookup_type_current_level): Likewise.
	(unqualified_namespace_lookup): Likewise.
	(namespace_ancestor): Likewise.
	(push_using_directive): Likewise.
	* decl.c (pushdecl): Move to name-lookup.c.
	(pushdecl_top_level_1): Likewise.
	(pushdecl_top_level): Likewise.
	(pushdecl_top_level_and_finish): Likewise.
	(maybe_push_decl): Likewise.
	(push_using_decl): Likewise.
	(push_overloaded_decl): Likewise.
	(make_anon_name): Likewise.
	(anon_cnt): Likewise.
	(clear_anon_tags): Likewise.
	(maybe_inject_for_scope_var): Likewise.
	(check_for_out_of_scope_variable): Likewise.
	* Make-lang.in (cp/name-lookup.o): Depend on flags.h.
	* decl.c (warn_extern_redeclared_static): Export.
	* cp-tree.h (warn_extern_redeclared_static): Declare.

From-SVN: r72492
2003-10-14 20:34:41 +00:00
Nathanael Nerode 43aba51835 config.gcc, [...]: Replace uses of target_alias with target_noncanonical.
gcc:
	* config.gcc, config/m68hc11/t-m68hc11-gas: Replace uses of
	target_alias with target_noncanonical.

ada:
	* Make-lang.in: Replace uses of $(target_alias) with
	$(target_noncanonical).
	* ada/Makefile.in: Remove unused mention of $(target_alias).

cp:
	* Make-lang.in: Replace uses of $(target_alias) with
	$(target_noncanonical).

java:
	* Make-lang.in: Replace uses of $(target_alias) with
	$(target_noncanonical).

From-SVN: r72487
2003-10-14 19:07:21 +00:00
Gabriel Dos Reis 00e8de680e Break out decl.c (2/n)
Break out decl.c (2/n)
	* name-lookup.c: Include diagnostic.h
	(cxx_binding_free): Make static.
	(cxx_binding_make): Likewise.
	(binding_table_new): Likewise
	(binding_table_free): Likewise.
	(binding_table_insert): Likewise.
	(binding_table_find_anon_type): Likewise.
	(binding_table_reverse_maybe_remap): Likewise.
	(supplement_binding): Likewise.
	* name-lookup.h (global_scope_name): Declare extern.
	(global_type_node): Likewise.
	(cxx_binding_free): Don't export.
	(cxx_binding_make): Likewise.
	(binding_table_new): Likewise.
	(binding_table_free): Likewise.
	(binding_table_insert): Likewise.
	(binding_table_find_anon_type): Likewise.
	(binding_table_reverse_maybe_remap): Likewise.
	* Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
	* decl.c (lookup_namespace_name): Move to name-lookup.c
	(select_decl): Likewise.
	(unqualified_namespace_lookup): Likewise.
	(lookup_qualified_name): Likewise.
	(lookup_name_real): Likewise.
	(lookup_name_nonclass): Likewise.
	(lookup_function_nonclass): Likewise.
	(lookup_name): Likewise.
	(lookup_name_current_level): Likewise.
	(lookup_type_current_level): Likewise.
	(lookup_flags): Likewise.
	(qualify_lookup): Likewise.
	(lookup_tag): Likewise.
	(lookup_tag_reverse): Likewise.
	(getdecls): Likewise.
	(storedecls): Remove.
	(cxx_remember_type_decls): Likewise.
	(global_bindings_p): Likewise.
	(innermost_nonclass_level): Likewise.
	(toplevel_bindings_p): Likewise.
	(namespace_bindings_p): Likewise.
	(kept_level_p): Likewise.
	(innermost_scope_kind): Likewise.
	(template_parm_scope_p): Likewise.
	(push_binding): Likewise.
	(push_local_binding): Likewise.
	(add_decl_to_level): Likewise.  Make extern.
	(push_class_binding): Move to name-lookup.c.
	(resume_level): Likewise.  Rename to resume_scope.
	(begin_scope): Likewise.
	(indent): Likewise.
	(binding_depth): Likewise.
	(is_class_level): Likewise.
	(cxx_scope_descriptor): Likewise.
	(cxx_scope_debug): Likewise.
	(namespace_scope_ht_size): Likewise.
	(leave_scope): Likewise.
	(pushlevel_class): Likewise.
	(poplevel_class): Likewise.
	(clear_identifier_class_values): Likewise.
	(pushdecl_with_scope): Likewise.
	(pushdecl_namespace_level): Likewise.
	(pushdecl_class_level): Likewise.
	(push_class_level_binding): Likewise.
	(push_using_directive): Likewise.
	(identifier_global_value): Likewise.
	(keep_next_level_flag): Likewise.
	(keep_next_level): Likewise.
	(free_binding_level): Likewise.
	(set_class_shadows): Likewise.
	(maybe_push_cleanup_level): Likewise.
	(cp_namespace_decls): Likewise.
	(bt_print_entry): Likewise.
	(print_binding_level): Likewise.
	(print_other_binding_stack): Likewise.
	(print_binding_stack): Likewise.
	(push_namespace): Likewise.
	(pop_namespace): Likewise.
	(push_nested_namespace): Likewise.
	(pop_nested_namespace): Likewise.
	(cxx_saved_binding_make): Likewise.
	(struct cxx_saved_binding_make): Likewise.
	(store_bindings): Likewise.
	(maybe_push_to_top_level): Likewise.
	(push_to_top_level): Likewise.
	(pop_from_top_level): Likewise.
	(identifier_type_value): Likewise.
	(set_identifier_type_value): Likewise.
	(set_identifier_type_value_with_scope): Likewise.
	(pop_everything): Likewise.
	(pushtag): Likewise.
	(follow_tag_typedef): Likewise.
	(maybe_process_template_type_declaration): Likewise.
	(pop_binding): Likewise.
	* cp-tree.h: Move corresponding declarations to name-lookup.h

From-SVN: r72426
2003-10-13 10:26:36 +00:00
Mark Mitchell 62b81e4524 re PR bootstrap/12512 (Pattern rule for %.dvi breaks make dvi in objc)
PR bootstrap/12512
	* Makefile.in (info): Use double-colon rules.
	(dvi): Likewise.
	(generated-manpages): Likewise.
	* configure.in: Do not create lang.info, lang.dvi, or
	lang.generated-manpages hooks.
	* configure: Regenerated.
	* objc/Make-lang.in (objc.info): Remove.
	(objc.dvi): Remove.
	(objc.generated-manpages): Remove.
	* doc/sourcebuild.texi: Update description of info, dvi, and
	generated-manpages hooks.

	* Make-lang.in (ada.info): Replace with ...
	(info): ... this.
	(ada.dvi): Replace with ...
	(dvi): ... this.

	* Make-lang.in (c++.info): Remove.
	(c++.dvi): Remove.
	(c++.generated-manpages): Replace with ...
	(generated-manpages): ... this.

	* Make-lang.in (f77.info): Replace with ...
	(info): ... this.
	(f77.dvi): Replace with ...
	(dvi): ... this.
	(f77.generated-manpages): Replace with ...
	(generated-manpages): ... this.

	* Make-lang.in (java.info): Replace with ...
	(info): ... this.
	(java.dvi): Replace with ...
	(dvi): ... this.
	(java.generated-manpages): Replace with ...

	* Make-lang.in (treelang.info): Replace with ...
	(info): ... this.
	* Make-lang.in (treelang.dvi): Replace with ...
	(dvi): ... this.

From-SVN: r72135
2003-10-06 07:56:16 +00:00
Gabriel Dos Reis c87ceb139f cp-tree.h (add_binding): Remove declaration.
* cp-tree.h (add_binding): Remove declaration.
        * name-lookup.h (supplement_binding): Declare.
        * decl.c (add_binding): Move to name-lookup.c.
        (push_local_binding): Adjust.
        (push_class_binding): Likewise.
        (set_identifier_type_value_with_scope): Likewise.
        * name-lookup.c (supplement_binding): Rename from add_binding.
        Return a bool.  Improve documentation.
        (set_namespace_binding): Adjust.
        * Make-lang.in (cp/name-lookup.o): Depend on toplev.h

From-SVN: r71144
2003-09-06 19:03:44 +00:00
Aldy Hernandez 7d1496792b Make-lang.in (cp/call.o): Add dependency for target.h.
2003-08-07  Aldy Hernandez  <aldyh@redhat.com>

	* cp/Make-lang.in (cp/call.o): Add dependency for target.h.

	* cp/call.c (standard_conversion): Support opaque types.
	Include target.h.
	(strip_top_quals): Use cp_build_qualified_type instead of
	TYPE_MAIN_VARIANT.

	* cp/typeck.c (convert_for_assignment): Support opaque types.

	* testsuite/g++.dg/other/opaque-1.C: New.

	* testsuite/g++.dg/other/opaque-2.C: New.

From-SVN: r70223
2003-08-07 12:49:57 +00:00
Gabriel Dos Reis e1a4dd13eb pretty-print.h (pp_set_line_maximum_length): Make macro.
* pretty-print.h (pp_set_line_maximum_length): Make macro.
	(pp_set_prefix): Likewise.
	(pp_destroy_prefix): Likewise.
	(pp_remaining_character_count_for_line): Likewise.
	(pp_clear_output_area): Likewise.
	(pp_formatted_text): Likewise.
	(pp_last_position_in_text): Likewise.
	(pp_emit_prefix): Likewise.
	(pp_append_text): Likewise.
	(pp_flush): Likewise.
	(pp_format_text): Likewise.
	(pp_format_verbatim): Likewise.
	(pp_tree_identifier): Tidy.
	* pretty-print.c (pp_base_format_text): Rename from pp_format_text.
	(pp_base_format_verbatim): Rename from pp_format_verbatim.
	(pp_base_flush): Rename from pp_flush.
	(pp_base_set_line_maximum_length): Rename from
	pp_set_line_maximum_length.
	(pp_base_clear_output_area): Rename from pp_clear_output_area.
	(pp_base_set_prefix): Rename from pp_set_prefix.
	(pp_base_destroy_prefix): Rename from pp_destroy_prefix.
	(pp_base_emit_prefix): Rename from pp_emit_prefix.
	(pp_base_append_text): Rename from pp_append_text.
	(pp_base_formatted_text): Rename from pp_formatted_text.
	(pp_base_last_position_in_text): Rename from pp_last_position_in_text.
	(pp_base_remaining_character_count_for_line): Rename from
	pp_remaining_character_count_for_line.
	* diagnostic.h (diagnostic_format_decoder): Tidy.
	(diagnostic_flush_buffer): Likewise.
	* c-pretty-print.h: (pp_c_string_literal): Declare.
	(pp_c_real_literal): Likewise.
	(pp_c_integer_literal): Likewise.
	* c-pretty-print.c (pp_c_char): Use pp_string in lieu of
	pp_identifier.
	(pp_c_character_literal): Tidy.
	(pp_c_string_literal): Make public.
	(pp_c_bool_literal): Likewise.
	(pp_c_integer_literal): Likewise.
	(pp_c_real_literal): Likewise.

	* Makefile.in (C_PRETTY_PRINT_H): New variable.
	(c-pretty-print.o): Update dependence.

cp/
	* cxx-pretty-print.h: New file.
	* cxx-pretty-print.c: Likewise.
	* error.c (scratch_pretty_printer): Change type.
	(init_error): Tidy.
	(dump_aggr_type): Likewise.
	(dump_global_iord): Likewise.
	(dump_expr): Likewise.
	(dump_char): Remove.
	* cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
	(cxx_initialize_diagnostics): New function.
	* Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
	(CXX_PRETTY_PRINT_H): New variable.
	(cp/cxx-pretty-print.o): New rule.
	(cp/cp-lang.o): Update dependence.
	(cp/error.o): Likewise.

From-SVN: r70182
2003-08-05 19:23:14 +00:00
Mark Mitchell 7b6d72fcfb re PR c++/11667 (wider-than-int enums never compare equal to 0)
PR c++/11667
	* c-common.c (shorten_compare): Take into account differences
	between C and C++ representation for enumeration types.
	* tree.h (set_min_and_max_values_for_integral_type): Declare.
	* stor-layout.c (set_min_and_max_values_for_integral_type): New
	function, broken out from ...
	(fixup_signed_type): ... here and ...
	(fixup_unsigned_type): ... here.

	PR c++/11667
	* call.c (standard_conversion): Allow all integral->enumeral
	conversions, after marking them as bad.
	* decl.c (finish_enum): Make sure that all enumerators are
	properly converted to the underlying type.
	(build_enumerator): Set DECL_CONTEXT for namespace-scope
	enumeration types.
	* pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
	(tsubst_enum): Tidy.

	* Make-lang.in (typeck.o): Depend on convert.h.
	(class.o): Likewise.
	(rtti.o): Likewise.
	* call.c: Include convert.h.
	(convert_arg_to_ellipsis): Use convert_to_real.
	* class.c: Include convert.h.
	(build_base_path): Use convert_to_integer.
	* rtti.c: Include convert.h.
	(build_headof): Use convert_to_integer.
	* typeck.c: Include convert.h.
	(decay_conversion): Use convert_to_integer.
	(build_unary_op): Use build_nop.
	(get_delta_difference): Use convert_to_integer.
	(build_ptrmemfunc): Avoid unncessary conversions.

From-SVN: r69909
2003-07-29 01:14:24 +00:00
Gabriel Dos Reis b6fe0bb8c5 Remove pedwarn_with_decl, warning_with_decl and error_with_decl from GCC.
Remove pedwarn_with_decl, warning_with_decl and error_with_decl
        from GCC.
        * calls.c (try_to_integrate): Don't use xxx_with_decl.
        (expand_call): Likewise.
        * dwarfout.c (output_reg_number): Likewise.
        * expr.c (expand_expr): Likewise.
        * function.c (assign_temp): Likewise.
        (uninitialized_vars_warning): Likewise.
        (setjmp_args_warning): Likewise.
        (expand_function_end): Likewise.
        * stmt.c (fixup_gotos): Likewise.
        (warn_about_unused_variables): Likewise.
        (expand_end_bindings): Likewise.
        * stor-layout.c (layout_decl): Likewise.
        (place_field): Likewise.
        * toplev.c (check_global_declarations): Likewise.
        (rest_of_handle_inlining): Likewise.
        (default_tree_printer): New function.
        (general_init): Initialize diagnostic machinery before routing
        signals to the ICE machinery.  Set default tree printer.
        * toplev.h (pedwarn_with_decl): Remove declaration.
        (warning_with_decl): Likewise.
        (error_with_decl): Likewise.
        (pedwarn): Remove attribute for the time being.
        * tree-inline.c (expand_call_inline): Don't use xxx_with_decl.
        * varasm.c (named_section): Likewise.
        (make_decl_rtl): Likewise.
        (assemble_variable): Likewise.
        (merge_weak): Likewise.
        (declare_weak): Likewise.

        * diagnostic.h: Move non-diagnostic stuff into pretty-print.h.
        * diagnostic.c: Move non-diagnostic stuff into pretty-print.c.
        (format_with_decl): Remove.
        (diagnostic_for_decl): Likewise.
        (pedwarn_with_decl): Likewise.
        (warning_with_decl): Likewise.
        (error_with_decl): Likewise.
        (diagnostic_initialize): Adjust.
        (diagnostic_count_diagnostic): Likewise.
        (announce_function): Likewise.
        (lhd_print_error_function): Likewise.
        (diagnostic_report_current_module): Likewise.
        (default_diagnostic_starter): Likewise.
        (diagnostic_report_diagnostic): Likewise.
        (default_diagnostic_finalizer): Likewise.
        (verbatim): Likewise.
        (error): Likewise.
        (warning): Likewise.
        * opts.c (common_handle_option): Likewise.
        * pretty-print.c: New file.
        * c-pretty-print.h (pp_base): Override.
        * c-pretty-print.c: Adjust use of macros throughout.
        (pp_buffer): New macro.
        (pp_newline): Likewise.
        * c-objc-common.c (c_tree_printer): Adjust prototype. Tidy.
        * Makefile.in (DIAGNOSTIC_H): New variable.
        (c-errors.o): Use it.
        (c-objc-common.o): Likewise.
        (c-common.o): Likewise.
        (c-opts.o): Likewise.
        (c-format.o): Likewise.
        (diagnostic.o): Likewise.
        (opts.o): Likewise.
        (toplev.o): Likewise.
        (rtl-error.o): Likewise.
        (dwarf2out.o): Likewise.
        (jump.o): Likewise.
        (pretty-print.o): New rule.

cp/
        * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
        * error.c: Use the new pretty-printer fraamework.

From-SVN: r69773
2003-07-25 09:52:32 +00:00
Andreas Jaeger 5671bf2771 genextract.c: Convert remaining prototypes to ISO C90.
2003-07-07  Andreas Jaeger  <aj@suse.de>

	* genextract.c: Convert remaining prototypes to ISO C90.

	* cpplex.c (_cpp_free_buff): Convert prototype to ISO C90.
	* fold-const.c (fold_single_bit_test): Likewise.
	* diagnostic.c (default_diagnostic_finalizer): Likewise.
	* cfgrtl.c (rtl_redirect_edge_and_branch): Likewise.

	* gengtype.c (write_array): Generate ISO C90 prototypes.

	* genflags.c (gen_proto): Generate ISO C90 prototypes.


For cp:
2003-07-07  Andreas Jaeger  <aj@suse.de>

	* friend.c: Convert to ISO C90 prototypes.

	* Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
	language.
	* cfns.h: Regenerate.

	* typeck.c: Convert remaining prototypes to ISO C90.
	* search.c: Likewise.

	* decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
	* semantics.c (expand_or_defer_fn): Likewise
	* mangle.c (discriminator_for_string_literal): Likewise.
	* g++spec.c (lang_specific_driver): Likewise.

	* search.c (lookup_base_r): Remove unused variable.

From-SVN: r69050
2003-07-07 21:11:59 +02:00
Jan Hubicka 8cd2462c1b decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
* decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
	(finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
	clear DECL_DEFER_OUTPUT once function is processed; avoid flags
	massaging.

	* cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
	(expand_or_defer_fn): Declare.
	(lower_function): Declare.
	* decl.c (start_cleanup_fn): Use expand_or_defer_fn.
	* decl2.c: Include cgraph.h and varpool.h
	(maybe_emit_vtables):  Make explicit instantations as needed.
	(mark_member_pointers, lower_function): New functions.
	(finish_file): Do unit-at-a-time.
	* method.c (synthesize_method): Use expand_or_defer_fn.
	* optimize.c (maybe_clone_body): Use expand_or_defer_fn.
	* parser.c (cp_parser_function_definition_after_decl): Use
	expand_or_defer_fn.
	* pt.c (instantiate_decl): Likewise.
	* semantics.c: Include cgraph.h
	(expand_or_defer_fn): Break out from ...
	(expand_body): ... here; deal with unit-at-a-time.
	* cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
	LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.

From-SVN: r68801
2003-07-02 00:12:10 +00:00
Neil Booth 37fa72e9d3 c-common.c (enum c_language_kind, flag_objc): Remove.
* c-common.c (enum c_language_kind, flag_objc): Remove.
	(fix_string_type, check_case_value, c_common_nodes_and_builtins,
	c_add_case_label, finish_label_addr_expr, boolean_increment):
	Use c_dialect_ macros.
	* c-common.h (enum c_language_kind): Extend.
	(c_dialect_cxx, c_dialect_objc): New.
	(flag_objc): Remove.
	(c_common_init_options): Update prototype.
	* c-cppbuiltin.c (define__GNUC__, c_cpp_builtins): Use c_dialect_
	macros.
	* c-decl.c (finsih_decl, grokfield, finish_struct): Use c_dialect_
	macros.
	* c-format.c (C_STD_VER, C_STD_NAME): Similarly.
	* c-lang.c (c_init_options): Remove.
	(c_language): Define.
	(LANG_HOOKS_INIT_OPTIONS): Use common hook.
	* c-lex.c (lex_charconst): Use c_dialect_cxx().
	* c-opts.c (lang_flags): Make function-local.
	(c_common_init_options): Use c_dialect_ macros.  Handle
	C++ diagnostic requirements.
	(c_common_handle_option, c_common_post_options): Use flag_cxx.
	* c-parse.in (init_reswords): Use c_dialect_objc ().
	* c-pch.c (get_ident): Use c_language.
	* c-pretty-print.c (pp_c_bool_literal): Use c_dialect_ macros.
	* c-typeck.c (comptypes, build_c_cast): Similarly.
	* objc/objc-lang.c (c_language): Define.
	(LANG_HOOKS_INIT_OPTIONS): Use common hook.
	(objc_init_options): Remove.
cp:
	* Make-lang.in: Update.
	* cp-lang.c (c_language): Define.
	(LANG_HOOKS_INIT_OPTIONS): Use common hook.
	* cp-tree.h (cxx_init_options): Remove.
	* lex.c: Don't include diagnostic.h.
	(cxx_init_options): Remove.

From-SVN: r68734
2003-06-30 19:36:25 +00:00
Jakub Jelinek 89ce1c8f76 i386.c (x86_output_mi_thunk): Don't pass MEM to %P0, just SYMBOL_REF.
* config/i386/i386.c (x86_output_mi_thunk): Don't pass MEM to %P0,
	just SYMBOL_REF.
	* config/s390/s390.c (s390_output_mi_thunk): Avoid .plt in -m31
	mode, as it requires pic register loaded.

	* varasm.c (resolve_unique_section): Remove prototype.  No longer
	static.
	* tree.h (resolve_unique_section): New prototype.
cp/
	* method.c (thunk_labelno): New variable.
	(make_alias_for_thunk): New function.
	(use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
	into the same section as the function it is calling.
	Include gt-cp-method.h.
	* Make-lang.in (gt-cp-method.h): Depend on s-gtype.
	(cp/method.o): Depend on gt-cp-method.h.
	* config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.

From-SVN: r68389
2003-06-23 22:52:14 +02:00
Neil Booth d7b4261875 Makefile.in: Update to use common.opt and lang_opt_files.
* Makefile.in: Update to use common.opt and lang_opt_files.
	(c-options.c, c-options.h): Remove.
	(options.c, options.h): Add.
	* c-opts.c: Include options.h not c-options.h.
	* common.opt: New file.
	* configure, configure.in: Add lang_opt_files.
	* opts.c: Include flags.h and diagnostic.h.
	(common_handle_option): New.
	(handle_option): Update to recognize common options and all
	language-dependent options.
	* opts.h (CL_F77, CL_JAVA, CL_ADA, CL_COMMON, CL_TREELANG): New.
	(struct cl_option): Make flags of type int.
	* opts.h: Flag option with front ends to which it applies.
	Handle duplicate options.
	* toplev.c (filename): Remove.
	(independent_decode_option): Don't handle filenames and -quiet.
	(process_options, do_compile): Update.
ada:
	* Make-lang.in: Update to use options.c and options.h.
	* misc.c: Include options.h not aoptions.h.
	(gnat_handle_option): Abort on unrecognized switch.
	(gnat_init_options): Request Ada switches.
cp:
	* Make-lang.in: Remove c-options.o.
f:
	* Make-lang.in: Update to use options.c and options.h.
	* top.c: Include options.h not f-options.h.
	(gnat_handle_option): Abort on unrecognized switch.
	(ffe_init_options): From com.c.  Request F77 options.
	(ffe_handle_options): Abort on unrecognized switch.
	* com.c (ffe_init_options): Move to top.c.
	* top.h (fee_init_options): New.
java:
	* Make-lang.in: Update to use options.c and options.h.
	* lang.c: Include options.h not j-options.h.
	(java_handle_option): Abort on unrecognized option.
	(java_init_options): Request Java switches.
treelang:
	* Make-lang.in: Update to use options.c and options.h.
	* tree1.c: Include options.h not t-options.h.
	(treelang_init_options): New.
	(treelang_handle_option): Abort on unrecognized switch.
	* treetree.c (LANG_HOOKS_INIT_OPTIONS): Override.
	* treetree.h (treelang_init_options): New.

From-SVN: r67941
2003-06-14 12:26:36 +00:00
Mark Mitchell 24386c5ec6 mangle.c (tm_p.h): Include it.
* mangle.c (tm_p.h): Include it.
	* Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).

From-SVN: r67798
2003-06-11 21:56:31 +00:00
Neil Booth 147d396eaa * Makfile.in, cp/Make-lang.in: Forgotten commit.
From-SVN: r67616
2003-06-08 07:55:18 +00:00
Jan Hubicka 8f231b5d87 install.tex: Document profiledbootstrap.
* install.tex: Document profiledbootstrap.

	* Makefile.tpl (profiledbootstrap): New target.
	* Makefile.in (profiledbootstrap): New target.

	* Makefile.in (clean, distclean): Kill new stages
	(POSTSTAGE1_FLAGS_TO_PASS): Break from ...
	(STAGE2_FLAGS_TO_PASS): ... this one.
	(STAGEPROFILE_FLAGS_TO_PASS, STAGEFEEDBACK_FLAGS_TO_PASS): New.
	(stage[2-4]_build): Add POSTSTAGE1_FLAGS_TO_PASS.
	(stageprofile_build, stageprofile_copy, stagefeedback_build,
	stagefeedback_copy): New.
	(restageprofile, restagefeedback, stageprofile-start,
	stageprofile, stagefeedback-start): Likewise.

	* Make-lang.in:  Add support for stageprofile and stagefeedback

From-SVN: r67498
2003-06-05 16:36:12 +00:00
Neil Booth 6338b35872 Makefile.in (c-lex.o, [...]): Update.
* Makefile.in (c-lex.o, LIBCPP_OBJS, cpplex.o): Update.
	* c-lex.c (MULTIBYTE_CHARS): Remove conditionals.
	(lex_string): Take cpp_string with full spelling.
	(cb_ident): Update.
	(c_lex): Update diagnostics.
	* cpplex.c (SPELL_NUMBER, SPELL_STRING): Combine into SPELL_LITERAL.
	(create_literal): New.
	(lex_string): Unterminated literals have type CPP_OTHER.
	(_cpp_lex_direct): Update calls to lex_string.  Use create_literal
	for CPP_OTHER.
	(cpp_token_len, cpp_spell_token, cpp_output_token): Simplify.
	(_cpp_equiv_tokens, cpp_interpret_charconst): Update.
	* cpplib.c (parse_include, do_line, do_linemarker,
	destringize_and_run): Update for token storing full spelling.
	* cpplib.h: Update token spelling types.
	* cppmacro.c (stringify_arg, check_trad_stringification):
	Update for token storing full spelling.
cp:
	* Make-lang.in (lex.o): Remove mbchar.h.
	* lex.c (MULTIBYTE_CHARS): Lose.
	* parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
	in c-lex.c.
testsuite:
	* gcc.dg/cpp/include2.c: Update.
	* gcc.dg/cpp/multiline-2.c: New.
	* gcc.dg/cpp/multiline.c: Update.
	* gcc.dg/cpp/strify2.c: Update.
	* gcc.dg/cpp/trad/literals-2.c: Update.

From-SVN: r66019
2003-04-23 22:44:06 +00:00
Zack Weinberg a9c89a57f6 Oops, this belongs with the previous calls.c commit
From-SVN: r65322
2003-04-07 05:52:07 +00:00
Kaveh R. Ghazi d893ff3389 Make-lang.in (cp-warn): Add $(STRICT_WARN).
* Make-lang.in (cp-warn): Add $(STRICT_WARN).
	* cp-tree.h: Don't insist on having GNUC.

From-SVN: r65217
2003-04-03 23:26:03 +00:00
Geoffrey Keating 0de298af46 Index: testsuite/ChangeLog
2003-04-02  Geoffrey Keating  <geoffk@apple.com>

	* g++.dg/pch/system-2.C: New.
	* g++.dg/pch/system-2.Hs: New.

Index: cp/ChangeLog
2003-04-02  Geoffrey Keating  <geoffk@apple.com>

	* mangle.c: Include gt-cp-mangle.h.
	(subst_identifiers): Mark with GTY.
	* config-lang.in (gtfiles): Add cp/mangle.c.
	* Make-lang.in: (gt-cp-mangle.h): New rule.
	(cp/mangle.o): Depends on gt-cp-mangle.h.

From-SVN: r65194
2003-04-03 03:45:49 +00:00
Andrew Pinski 28ea4c880d config-lang.in (gtfiles): add \$(srcdir)/cp/name-lookup.c after \$(srcdir)/cp/name-lookup.h.
2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>

        * config-lang.in (gtfiles): add \$(srcdir)/cp/name-lookup.c
        after \$(srcdir)/cp/name-lookup.h.
        * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
        of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
        * Make-lang.in: (gt-cp-name-lookup.h): is generated by the gtype.
        (cp/name-lookup.o): depends on gt-cp-name-lookup.h.

From-SVN: r65142
2003-04-01 15:37:00 -05:00
Gabriel Dos Reis 7c71dc2b0d * Make-lang.in (cp/name-lookup.o): Add more dependencies.
From-SVN: r65051
2003-03-30 20:16:06 +00:00
Gabriel Dos Reis aed81407a6 name-lookup.c: New file.
* name-lookup.c: New file.
	* name-lookup.h: Likewise..
	* decl.c (push_binding): Adjust use cxx_binding_make.
	(free_bindings): Move to name-lookup.c
	(pop_binding): Use cxx_binding_free.
	(binding_for_name): Tidy.
	* cp-tree.h: Include "name-lookup.h"
	(cxx_binding_make): Move to name-lookup.h
	(cxx_binding_clear): Likewise.
	(struct cxx_binding): Likewise.
	(LOCAL_BINDING_P): Likewise.
	(INHERITED_VALUE_BINDING_P): Likewise.
	(BINDING_SCOPE): Likewise.
	(BINDING_HAS_LEVEL_P): Likewise.
	(BINDING_VALUE): Likewise.
	(BINDING_TYPE): Likewise.
	* config-lang.in (gtfiles): Add cp/name-lookup.h
	* Make-lang.in (cp/name-lookup.o): New rule.
	(CXX_OBJS): Add cp/name-lookup.o
	(CXX_TREE_H): Add cp/name-lookup.h

From-SVN: r65040
2003-03-30 13:18:18 +00:00
Loren J. Rittle 31260fb846 Makefile.in (STRICT2_WARN): Add @WERROR@.
* Makefile.in (STRICT2_WARN): Add @WERROR@.
        (GCC_WARN_CFLAGS): Remove $(WERROR).
        (fixinc.sh-warn): New.
        * ada/Make-lang.in (ada-warn): Add $(WERROR).
        * cp/Make-lang.in (cp-warn): Add $(WERROR).
        * f/Make-lang.in (f-warn): Add $(WERROR).
        * java/Make-lang.in (java-warn): Add $(WERROR).
        * treelang/Make-lang.in (treelang-warn): Add $(WERROR).

From-SVN: r64606
2003-03-20 03:11:25 +00:00
Andreas Jaeger 40a4184c57 Make-lang.in (treelang.tags): Remove duplicate entry.
Treelang:
2003-03-17  Andreas Jaeger  <aj@suse.de>

	* Make-lang.in (treelang.tags): Remove duplicate entry.

cp:
2003-03-17  Andreas Jaeger  <aj@suse.de>

	* Make-lang.in (cp/TAGS): Remove.

From-SVN: r64463
2003-03-17 06:46:05 +01:00
Neil Booth c1bad961ed Makefile.in: Update.
* Makefile.in: Update.
	* c-common.h (cb_register_builtins): Rename c_cpp_builtins.
	* c-lex.c (init_c_lex): Register builtins hook is dead.
	* c-opts.c (COMMAND_LINE_OPTIONS, missing_arg): Handle -A, -D and -U.
	(c_common_decode_option): Don't call cpp_handle_option.
	Handle -A, -D and -U.
	(handle_deferred_opts): Simplify.
	(finish_options): Define builtins and command line macros.
	* c-ppoutput.c (init_pp_output): Register builtins hook is dead.
	* cppinit.c: Don't include intl.h.
	(init_builtins): Rename cpp_init_builtins.  No hook to call.
	(init_library): Don't need to sort options.
	(cpp_create_reader): Don't set pending.
	(cpp_destroy): Don't free pending.
	(struct pending_option, cl_directive_handler, struct cpp_pending,
	APPEND, free_chain, new_pending_directive, parse_option, opt_comp,
	cpp_finish_options, COMMAND_LINE_OPTIONS, DEF_OPT, struct cl_option,
	cl_options, cpp_handle_option): Remove.
	* cpplib.h (struct cpp_pending, register_builtins, cpp_handle_option,
	cpp_finish_options): Remove.
	(cpp_init_builtins): New.
	* fix-header.c (read_scan_file): Update to handle -D.  Fix
	handling of -I.  Replace call to cpp_finish_options.
cp:
	* Make-lang.in: Update.

From-SVN: r64398
2003-03-15 12:18:47 +00:00
Alexandre Oliva 2bfe542b56 g++.1: Remove.
* g++.1: Remove.
* Make-lang.in (c++.generated-manpages): Build cp/g++.1.
(cp/g++.1): Build it from scratch in the build tree.
(c++.install-man): Depend on it.  Install it from the build tree.
(c++.mostlyclean): Clean it.

From-SVN: r64214
2003-03-12 04:18:34 +00:00
Neil Booth cb60f38d5b Makefile.in: Update.
* Makefile.in: Update.
	* c-common.c: Don't include real.h or except.h.
	(REGISTER_PREFIX): Remove.
	(builtin_define_std, builtin_define_with_value,
	builtin_define_with_int_value, builtin_define_with_hex_fp_value,
	builtin_define_type_max, builtin_define_type_precision,
	builtin_define_float_constants): Move to c-cppbuiltin.c.
	(c_stddef_cpp_builtins): New.
	* c-common.h (builtin_define_with_value, c_stddef_cpp_builtins): New.
	* c-cppbuiltin.c: New, extracted from c-common.c.
	(define__GNUC__): New.
	* cppspec.c (lang_specific_driver): Remove support of -no-gcc.
	* gcc.c: Remove support of %v1, %v2 and %v3 specs.
	(cpp_unique_options): Don't support no-gcc.
	(do_spec_1): Remove support of version specs.
	* doc/invoke.texi: Remove documentation of %v1, %v2 and %v3.
	* doc/passes.texi: Update.
	* doc/tm.texi: Update.
cp:
	* Make-lang.in (CXX_C_OBJS): Update.
	* lang-specs.h: Don't define __GNUG__ here.

From-SVN: r64162
2003-03-11 06:42:21 +00:00
Tom Tromey b87141b367 * Make-lang.in (c++.tags): New target.
From-SVN: r63805
2003-03-04 21:32:09 +00:00
Neil Booth f20d8e3913 * Make-lang.in: Update.
From-SVN: r63774
2003-03-04 07:01:38 +00:00
Neil Booth 5793b27668 Makefile.in (C_AND_OBJC_OBJS, [...]): Update.
* Makefile.in (C_AND_OBJC_OBJS, c-incpath.o, c-lex.o, LIBCPP_OBJS,
	cppinit.o, cppdefault.o, fix-header): Update.
	* c-incpath.c: New file.
	* c-incpath.h: New file.
	* c-lex.c: Include c-incpath.h.
	(init_c_lex): Register path simplifier.
	* c-opts.c: Include cppdefault.h and c-incpath.h.
	(TARGET_SYSTEM_ROOT, verbose, iprefix, sysroot, std_inc,
	std_cxx_inc, quote_chain_split, add_prefixed_path): New.
	(COMMAND_LINE_OPTIONS): Add more options from cpplib.
	(missing_arg, c_common_decode_option): Handle them.
	(c_common_post_options): Register include chains.
	(print_help): Update.
	* cppdefault.h (struct default include): Update.
	Move some macros to ...
	* cppdefault.c: ... here.
	(cpp_include_defaults): Add extra field add_sysroot.
	* cppfiles.c (include_file, search_from, find_or_create_entry,
	cpp_included, find_include_file, remap_filename): Update for
	renaming of search_path to cpp_path, and of the chain headers.
	(remove_component_p, _cpp_simplify_pathname): Move to c-incpath.c.
	* cpphash.h (struct search_path): Move to cpplib.h.
	(struct cpp_buffer, struct cpp_reader): Update.
	(_cpp_simplify_pathname): Remove.
	* cppinit.c: Don't include prefix.h and cppdefault.h.
	(INO_T_EQ, INO_T_COPY, path_include, append_include_chain,
	remove_dup_dir, remove_dup_nonsys_dirs, remove_dup_dirs,
	init_standard_includes, BRACKET, SYSTEM, AFTER, no_dir,
	no_pth, cpp_handle_options): Remove.
	(struct pending_option): Remove chain members.
	(cpp_destroy, cpp_read_main_file, COMMAND_LINE_OPTIONS,
	cpp_handle_option): Update.
	* cpplib.h (struct cpp_path, cpp_set_include_chains): New.
	(struct cpp_options): Remove quote_include, bracket_include,
	include_prefix, include_prefix_len, verbose, ignore_srcdir,
	no_standard_includes, no_standard_cplusplus_includes.
	(struct cpp_callbacks): Add simplify_path.
	(cpp_handle_options): Remove.
	* fix-header.c: Include c-incpath.h.
	(read_scan_file): Update to use c-incpath functionality.
	* doc/passes.texi: Update.
cp:
	* Make-lang.in (CXX_C_OBJS): Update.

From-SVN: r63612
2003-03-01 14:31:21 +00:00
Gabriel Dos Reis 22ffcc6f9f timevar.h (POP_TIMEVAR_AND_RETURN): New macro.
* timevar.h (POP_TIMEVAR_AND_RETURN): New macro.
cp/
	* decl.c: Include "timevar.h".
	(poplevel): Time name lookup.
	(find_binding): Likewise.
	(push_namespace): Likewise.
	(pop_nested_namespace): Likewise.
	(store_bindings): Likewise.
	(maybe_push_to_top_level): Likewise.
	(pop_from_top_level): Likewise.
	(push_local_name): Likewise.
	(pushtag): Likewise.
	(pushdecl): Likewise.
	(pushdecl_with_scope): Likewise.
	(pushdecl_namespace_level): Likewise.
	(pushdecl_top_level): Likewise.
	(pushdecl_class_level): Likewise.
	(push_class_level_binding): Likewise.
	(push_using_decl): Likewise.
	(push_using_directive): Likewise.
	(push_overloaded_decl): Likewise.
	(lookup_label): Likewise.
	(define_label): Likewise.
	(lookup_tag): Likewise.
	(lookup_tag_reverse): Likewise.
	(lookup_namespace_name): Likewise.
	(select_decl): Likewise.
	(unqualified_namespace_lookup): Likewise.
	(lookup_name_real): Likewise.
	(lookup_name_current_level): Likewise.
	(lookup_type_current_level): Likewise.
	(maybe_inject_for_scope_var): Likewise.
	(xref_tag): Likewise.

	* Make-lang.in (cp/decl.o): Add dependency on timevar.h

From-SVN: r62819
2003-02-13 04:57:20 +00:00
Geoffrey Keating f099d36039 Index: ChangeLog
2003-01-30  Geoffrey Keating  <geoffk@apple.com>

	* gengtype.c (struct walk_type_data): Add needs_cast_p.
	(walk_type): Set needs_cast_p in walk_type_data.
	(write_types_process_field): Supply casts when required to suppress
	warnings.
	(write_root): Cast gt_pch_n_S to suppress warning.
	* Makefile.in: Remove -Wno-error from gtype-desc.o and c-decl.o.
	* cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
	* config/rs6000/rs6000.c (print_operand): Mask off high bits only
	when they might exist.
	* config/rs6000/t-rs6000: Remove -Wno-error from varasm.o,
	insn-conditions.o, and rs6000.o.

Index: cp/ChangeLog
2003-01-30  Geoffrey Keating  <geoffk@apple.com>

	* cp/Make-lang.in: Remove -Wno-error from cp/decl.o.

From-SVN: r62170
2003-01-31 01:42:38 +00:00
Kaveh R. Ghazi dd859b8ac0 Makefile.in (GCC_WARN_CFLAGS): Add $(WERROR) $($@-warn) (gtype-desc.o-warn...
gcc:
	* Makefile.in (GCC_WARN_CFLAGS): Add $(WERROR) $($@-warn)
	(gtype-desc.o-warn, c-decl.o-warn, varasm.o-warn, gcc.o-warn,
	insn-conditions.o-warn, out_object_file, gengtype-yacc.o-warn,
	c-parse.o-warn): Add -Wno-error.
	(STAGE2_FLAGS_TO_PASS): Add WERROR="@WERROR@".

	* configure.in (--enable-werror): Add new flag.
	* doc/install.texi (--enable-werror): Document.
	* configure: Regenerate.

	* objc/Make-lang.in (objc/objc-parse.o-warn): Add -Wno-error.

cp:
	Make-lang.in (cp/decl.o-warn): Add -Wno-error.

f:
	Make-lang.in (f/sta.o-warn): Add -Wno-error.

java:
	Make-lang.in (jvspec.o-warn): Add -Wno-error.

From-SVN: r61544
2003-01-21 13:45:16 +00:00
Geoffrey Keating 17211ab553 Merge from pch-branch.
From-SVN: r61136
2003-01-10 02:22:34 +00:00
Christian Cornelssen 2c6ce97ed1 Make-lang.in (c++.install-common, [...]): Prepend $(DESTDIR) to destination paths in all (un)installation commands.
2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>

	* Make-lang.in (c++.install-common, c++.install-man,
	c++.uninstall): Prepend $(DESTDIR) to destination paths in
	all (un)installation commands.
	(c++.install-common): Rewrite $(LN) commands to support
	DESTDIR with "ln" as well as with "ln -s".

From-SVN: r61079
2003-01-09 09:04:52 +01:00
Mark Mitchell afd9b9dd9d parse.y: Remove.
* parse.y: Remove.
	* spew.c: Likewise.
	* Make-lang.in (gt-cp-spew.h): Remove.
	* cp-tree.h (do_pending_lang_change): Remove.
	(do_identifier): Change prototype.
	(finish_id_expr): Remove.
	* decl.c (lookup_name_real): Remove yylex variable.
	* decl2.c (build_expr_from_tree): Adjust call to do_identifier.
	* lex.c (init_cpp_parse): Remove.
	(reduce_cmp): Likewise.
	(token_cmp): Likewise.
	(yychar): Likewise.
	(lastiddecl): Likewise.
	(token_count): Likewise.
	(reduce_count): Likewise.
	(yyhook): Likewise.
	(print_parse_statistics): Likewise.
	(do_pending_lang_change): Likewise.
	(do_identifier): Remove parsing parameter.
	* lex.h (lastiddecl): Remove.
	(looking_for_typename): Remove.
	(looking_for_template): Likewise.
	(pending_lang_change): Likewise.
	(yylex): Likewise.
	* semantics.c (finish_id_expr): Remove.

From-SVN: r60642
2002-12-30 19:02:11 +00:00
Nathanael Nerode b599b13591 config-lang.in, [...]: GCC, not GNU CC.
* config-lang.in, Make-lang.in, operators.def, cp-tree.def:
	GCC, not GNU CC.

From-SVN: r60638
2002-12-30 18:06:39 +00:00
Mark Mitchell a723baf1eb Make-lang.in (po-generated): Remove parse.c.
* Make-lang.in (po-generated): Remove parse.c.
	(CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
	($(srcdir)/cp/parse.h): Remove target.
	($(srcdir)/cp/parse.c): Likewise.
	(gt-cp-parse.h): Likewise.
	(gt-cp-parser.h): New target.
	(c++.distclean): Do not remove parse.output.
	(c++.maintainer-clean): Do not remove parse.c or parse.h.
	(cp/spew.o): Remove target.
	(cp/lex.o): Adjust dependencies.
	(cp/pt.o): Likewise.
	(cp/parse.o): Likewise.
	(cp/TAGS): Do not mention parse.c.
	(cp/parser.o): New target.
	* NEWS: Mention the new parser.
	* call.c (build_scoped_method_call): Simplify.
	(build_method_call): Likewise.
	(build_new_function_call): Adjust calls to add_function_candidate
	and add_template_candidate.
	(build_new_op): Improve handling of erroroneous operands.
	(convert_default_arg): Remove circular argument processing.
	(name_as_c_string): New function.
	(build_new_method_call): Use it.
	(perform_implicit_conversion): Use error_operand_p.
	* class.c (finish_struct_anon): Use constructor_name_p.
	(check_field_decls): Likewise.
	(pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
	(resolve_address_of_overloaded_function): Likewise.
	(instantiate_type): Tweak pointer-to-member handling.
	(get_primary_binfo): Remove incorrect assertion.
	* config-lang.in (gtfiles): Add parser.c, remove parse.c.
	* cp-tree.h (DEFARG_TOKENS): New macro.
	(default_arg): New structure.
	(cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
	(lang_tree_node): Add default_arg.
	(cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
	(type_info_ref_type): New macro.
	(saved_scope): Make processing_explicit_instantiation a boolean.
	(check_access): New field.
	(unparsed_text): Remove.
	(language_function): Remove unparsed_inlines.
	(error_operand_p): New macro.
	(lang_decl): Adjust pending_inline_info.
	(DEFARG_POINTER): Remove.
	(tag_types): Add typenames.
	(lookup_ualified_name): Declare.
	(lookup_name_real): Likewise.
	(shadow_tag): Adjust prototype.
	(get_scope_of_declarator): Declare it.
	(process_next_inline): Remove it.
	(check_for_missing_semicolon): Likewise.
	(maybe_get_template_decl_from_type_decl): Declare it.
	(finish_label_stmt): Adjust prototype.
	(finish_non_static_data_meber): Declare it.
	(finish_pseudo_destructor_call_expr): Rename to ...
	(finish_pseudo_destructor_expr): ... this.
	(finish_compound_literal): Declare it.
	(begin_inline_definitions): Remove it.
	(init_spew): Remove.
	(peekyylex): Likewise.
	(arbitrate_lookup): Likewise.
	(frob_opname): Likewise.
	(maybe_snarf_defarg): Likewise.
	(add_defarg_fn): Likewise.
	(do_pending_defargs): Likewise.
	(done_pending_defargs): Likewise.
	(unprocessed_defarg_fn): Likewise.
	(replace_defarg): Likewise.
	(end_input): Likewise.
	(get_overloaded_fn): Likewise.
	* cvt.c (convert_to_reference): Improve error handling.
	* decl.c (lookup_name_real): Do not declare it static.
	(maybe_push_to_top_level): Set check_access.
	(identifier_type_value): Adjust call to lookup_name_real.
	(lookup_qualified_name): New method.
	(lookup_name_real): Remove special-case parsing code.
	(lookup_name-nonclass): Adjust call to lookup_name_real.
	(lookup_name_namespace_only): Likewise.
	(lookup_name): Likewise.
	(check_tag_decl): Return the type declared.
	(shadow_tag): Likewise.
	(register_dtor_fn): Tweak check_access.
	(grokfndecl): Use constructor_name_p.
	(get_scope_of_declarator): New function.
	(grokdeclarator): Obscure tweaks for slightly different declarator
	representations.
	(start_method): Return error_mark_node to indicate failure.
	(cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
	* decl2.c (constructor_name_full): Simplify.
	(constructor_name): Use it.
	(build_expr_from_tree): Adjust for changes to do new parser.
	(push_scope): Improve robustness.
	(validate_nonmember_using_decl): Process declarations, not names.
	(do_class_using_decl): Likewise.
	(handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
	here.
	* error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
	* expr.c (cxx_expand_expr): Handle BASELINKs.
	* init.c (member_init_ok_or_else): Issue more errors.
	(build_offset_ref): Tweak handling of FUNCTION_DECLs.
	* lex.c: Do not include parse.h.
	(yypring): Do not declare.
	(yylval): Likewise.
	(make_reference_declarator): Remove error-generating code.
	(rid_to_yy): Remove.
	(cxx_init): Do not call init_spew.
	(yypring): Remove.
	(check_for_missing_semicolon): Remove.
	* lex.h (got_scope): Remove.
	(got_object): Remove.
	* method.c (hack_identifier): Use finish_non_static_data_member.
	(implicitly_declare_fn): Adjust use of constructor_name.
	* parser.c: New file.
	* pt.c (parse.h): Do not include it.
	(maybe_get_template_decl_from_template): Do not declare it.
	(finish_member_template_decl): Tweak.
	(begin_explicit_instantiation): Adjust for
	processing_explicit_instantiation being boolean.
	(end_explicit_instantiation): Likewise.
	(maybe_process_partial_specialization): Tighten specialization
	test.
	(retrieve_local_specialization): Adjust ue of hash table.
	(eq_local_specializations): New function.
	(register_local_specialization): Likewise.
	(push_template_decl_real): Remove unnecessary test.
	(maybe_get_template_decl_from_type_decl): Don't make it static.
	(for_each_template_parm_r): Handle TYPEOF_TYPE.
	(tsubst_copy): Use retrieive_local_specialization to handle
	PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
	Handle COMPONENT_REFs with pseudo-destructor-expressions.
	Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
	(tsubst_expr): Pass decls, not names, to do_local_using_decl.
	(unify): Tweak handling of CONST_DECLs.
	(regenerate_decl_from_template): Use push_nested_class.
	(template_for_substitution): New funciton.
	(instantiate_decl): Use it.  Register parameters as local
	specializations.
	* rtti.c (init_rtti_processing): Set type_info_ref_type.
	(build_typeid): Use it.
	(get_typeid): Likeise.
	* search.c (accessible_p): Use check_access, not
	flag_access_control.
	(adjust_result_of_qualified_name_lookup): Pay attention to the
	context_class.
	* semantics.c (finish_asm_stmt): Adjust error handling.
	(finish_label_stmt): Return the statement.
	(finish_non_static_data_member): New function.
	(finish_class_expr): Handle BASELINKs.
	(finish_call_expr): Handle PSEUDO_DTOR_EXPR.
	(finish_object_call_expr): Simplify handling during templates.
	(finish_pseudo_destructor_call_expr): Rename to ...
	(finish_pseudo_dtor_expr): ... this.
	(finish_compound_literal): New function.
	(begin_inline_definitions): Remove.
	(finish_sizeof): Remove special template handling.
	* spew.c: Do not include parse.h.
	* tree.c (get_overloaded_fn): Remove.
	* typeck.c (build_class_member_access_expr): Handle
	PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
	(lookup_destructor): New function.
	(finish_class_member_access_expr): Use it.
	(convert_arguments): Simplify.
	(build_unary_op): Handle BASELINKs.

From-SVN: r60560
2002-12-28 08:03:42 +00:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Mark Mitchell 483ab821df target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Default to NULL.
* target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Default to NULL.
	(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Likewise.
	(TARGET_ASM_OUT): Add them.
	* target.h (asm_out): Add output_mi_thunk and
	output_mi_vcall_thunk.
	* config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/arm/arm-protos.h (arm_output_mi_thunk): Declare.
	* config/arm/arm.c (arm_output_mi_thunk): Define.
	* config/arm/arm.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/cris/cris.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/frv/frv.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/i386/i386-protos.h (x86_output_mi_thunk): Adjust
	prototype.
	(x86_output_mi_vcall_thunk): Declare.
	* config/i386/i386.c (override_options): Clear
	output_mi_vcall_thunk in 64-bit mode.
	(ix86_fntype_regparm): New function.
	(ix86_return_pops_args): Use it.
	(ia32_this_parameter): New function.
	(x86_output_mi_vcall_thunk): New function.
	(x86_output_mi_thunk): Use it
	* config/i386/unix.h (TARGET_ASM_OUTPUT_MI_THUNK): Adjust.
	(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Define.
	* config/i960/i960-protos.h (i960_output_mi_thunk): Declare.
	* config/i960/i960.c (i960_output_mi_thunk): New function.
	* config/i960/i960.h (ASM_OUTPUT_MI_THUNK): Adjust.
	* config/ia64/ia64-protos.h (ia64_output_mi_thunk): Declare.
	* config/ia64/ia64.c (ia64_output_mi_thunk): Define.
	* config/ia64/ia64.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/m68k/m68k-protos.h (m68k_output_mi_thunk): New function.
	* config/m68k/linux.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/m68k/netbsd-elf.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/mmix/mmix.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/pa/pa.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/rs6000/sysv4.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/s390/s390-protos.h (s390_output_mi_thunk): Declare.
	* config/s390/s390.c (s390_output_mi_thunk): Define.
	* config/s390/s390.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/stormy16/stormy16.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* config/vax/vax-protos.h (vax_output_mi_thunk): Declare.
	* config/vax/vax.c (vax_output_mi_thunk): Define.
	* config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Rename to ...
	(TARGET_ASM_OUTPUT_MI_THUNK): ... this.
	* doc/tm.texi: Adjust documentation.

From-SVN: r58293
2002-10-18 23:35:40 +00:00