gcc/gcc/cp/Make-lang.in

281 lines
11 KiB
Plaintext
Raw Normal View History

# Top level -*- makefile -*- fragment for GNU C++.
# Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
1994-04-22 09:25:56 +02:00
#This file is part of GCC.
1994-04-22 09:25:56 +02:00
#GCC is free software; you can redistribute it and/or modify
1994-04-22 09:25:56 +02:00
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2, or (at your option)
#any later version.
#GCC is distributed in the hope that it will be useful,
1994-04-22 09:25:56 +02:00
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with GCC; see the file COPYING. If not, write to
1995-06-15 23:06:59 +02:00
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA.
1994-04-22 09:25:56 +02:00
# This file provides the language dependent support in the main Makefile.
# Each language makefile fragment must provide the following targets:
#
# foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
# foo.info, foo.dvi,
# foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
# foo.uninstall,
# foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
1994-04-22 09:25:56 +02:00
#
# where `foo' is the name of the language.
#
# It should also provide rules for:
#
# - making any compiler driver (eg: g++)
# - the compiler proper (eg: cc1plus)
# - define the names for selecting the language in LANGUAGES.
# Actual names to use when installing a native compiler.
CXX_INSTALL_NAME = `echo c++|sed '$(program_transform_name)'`
GXX_INSTALL_NAME = `echo g++|sed '$(program_transform_name)'`
CXX_TARGET_INSTALL_NAME = $(target_alias)-`echo c++|sed '$(program_transform_name)'`
GXX_TARGET_INSTALL_NAME = $(target_alias)-`echo g++|sed '$(program_transform_name)'`
# Actual names to use when installing a cross-compiler.
CXX_CROSS_NAME = `echo c++|sed '$(program_transform_cross_name)'`
GXX_CROSS_NAME = `echo g++|sed '$(program_transform_cross_name)'`
#
1994-04-22 09:25:56 +02:00
# Define the names for selecting c++ in LANGUAGES.
# Note that it would be nice to move the dependency on g++
# into the C++ rule, but that needs a little bit of work
# to do the right thing within all.cross.
C++ c++: cc1plus$(exeext)
1994-04-22 09:25:56 +02:00
# Tell GNU make to ignore these if they exist.
.PHONY: C++ c++
g++spec.o: $(srcdir)/cp/g++spec.c $(SYSTEM_H) coretypes.h $(TM_H) $(GCC_H) $(CONFIG_H)
(SHLIB_LINK='$(SHLIB_LINK)' \
SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
$(INCLUDES) $(srcdir)/cp/g++spec.c)
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 09:03:42 +01:00
po-generated:
1994-04-22 09:25:56 +02:00
# Create the compiler driver for g++.
GXX_OBJS = gcc.o g++spec.o intl.o prefix.o version.o
g++$(exeext): $(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
$(GXX_OBJS) $(EXTRA_GCC_OBJS) $(LIBS)
1994-04-22 09:25:56 +02:00
# Create a version of the g++ driver which calls the cross-compiler.
g++-cross$(exeext): g++$(exeext)
-rm -f g++-cross$(exeext)
cp g++$(exeext) g++-cross$(exeext)
1994-04-22 09:25:56 +02:00
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
# The compiler itself.
# Shared with C front end:
CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \
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 15:31:21 +01:00
c-dump.o $(CXX_TARGET_OBJS) c-pretty-print.o c-opts.o c-pch.o \
c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
# Language-specific object files.
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 02:27:33 +02:00
CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
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 09:03:42 +01:00
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o \
cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o \
cp/optimize.o cp/mangle.o cp/cp-lang.o cp/name-lookup.o
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
# Use loose warnings for this front end.
cp-warn = $(WERROR)
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
cc1plus$(exeext): $(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) \
libcpp.a $(LIBDEPS)
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
$(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) libcpp.a $(LIBS)
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
# Special build rules.
$(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \
$(srcdir)/cp/cfns.gperf > $(srcdir)/cp/cfns.h
gtype-cp.h gt-cp-call.h gt-cp-decl.h gt-cp-decl2.h : s-gtype; @true
gt-cp-pt.h gt-cp-repo.h gt-cp-parser.h : s-gtype; @true
gt-cp-tree.h gt-cp-name-lookup.h: s-gtype; @true
#
1994-04-22 09:25:56 +02:00
# Build hooks:
c++.all.build: g++$(exeext)
c++.all.cross: g++-cross$(exeext)
c++.start.encap: g++$(exeext)
c++.rest.encap:
1994-04-22 09:25:56 +02:00
c++.tags: force
cd $(srcdir)/cp; etags *.c *.h
c++.info:
1994-04-22 09:25:56 +02:00
c++.dvi:
c++.generated-manpages: cp/g++.1
#
1994-04-22 09:25:56 +02:00
# Install hooks:
# cc1plus is installed elsewhere as part of $(COMPILERS).
# Nothing to do here.
c++.install-normal:
# Install the driver program as $(target)-g++
# and also as either g++ (if native) or $(tooldir)/bin/g++.
c++.install-common: installdirs
-if [ -f cc1plus$(exeext) ] ; then \
if [ -f g++-cross$(exeext) ] ; then \
rm -f $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
$(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
chmod a+x $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \
rm -f $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(GXX_CROSS_NAME)$(exeext) $(CXX_CROSS_NAME)$(exeext) ); \
if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
rm -f $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \
$(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \
rm -f $(DESTDIR)$(gcc_tooldir)/bin/c++$(exeext); \
( cd $(DESTDIR)$(gcc_tooldir)/bin && \
$(LN) g++$(exeext) c++$(exeext) ); \
else true; fi; \
1994-04-22 09:25:56 +02:00
else \
rm -f $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
$(INSTALL_PROGRAM) g++$(exeext) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
chmod a+x $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
rm -f $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(GXX_INSTALL_NAME)$(exeext) $(CXX_INSTALL_NAME)$(exeext) ); \
rm -f $(DESTDIR)$(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(GXX_INSTALL_NAME)$(exeext) $(GXX_TARGET_INSTALL_NAME)$(exeext) ); \
rm -f $(DESTDIR)$(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \
( cd $(DESTDIR)$(bindir) && \
$(LN) $(CXX_INSTALL_NAME)$(exeext) $(CXX_TARGET_INSTALL_NAME)$(exeext) ); \
1994-04-22 09:25:56 +02:00
fi ; \
fi
c++.install-info:
1994-04-22 09:25:56 +02:00
cp/g++.1:
-rm -f $@
if [ "$(ALL)" = all.cross ]; then \
echo ".so man1/$(GCC_CROSS_NAME).1" > $@ ; \
else \
echo ".so man1/$(GCC_INSTALL_NAME).1" > $@ ; \
fi
c++.install-man: installdirs cp/g++.1
-if [ -f cc1plus$(exeext) ] ; then \
if [ -f g++-cross$(exeext) ] ; then \
rm -f $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
$(INSTALL_DATA) cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
chmod a-x $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \
else \
rm -f $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
$(INSTALL_DATA) cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
chmod a-x $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \
fi; \
1994-04-22 09:25:56 +02:00
else true; fi
c++.uninstall:
-rm -rf $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext)
-rm -rf $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext)
-rm -rf $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext)
-rm -rf $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext)
-rm -rf $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext)
#
1994-04-22 09:25:56 +02:00
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
# We just have to delete files specific to us.
c++.mostlyclean:
-rm -f cp/g++.1
-rm -f cp/*$(objext)
-rm -f cp/*$(coverageexts)
1994-04-22 09:25:56 +02:00
c++.clean:
c++.distclean:
-rm -f cp/config.status cp/Makefile
c++.extraclean:
c++.maintainer-clean:
#
1994-04-22 09:25:56 +02:00
# Stage hooks:
# The main makefile has already created stage?/cp.
c++.stage1: stage1-start
-mv cp/*$(objext) stage1/cp
c++.stage2: stage2-start
-mv cp/*$(objext) stage2/cp
c++.stage3: stage3-start
-mv cp/*$(objext) stage3/cp
c++.stage4: stage4-start
-mv cp/*$(objext) stage4/cp
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
#
# .o: .h dependencies.
CXX_TREE_H = $(TREE_H) cp/name-lookup.h cp/cp-tree.h c-common.h \
cp/cp-tree.def c-common.def \
function.h varray.h $(SYSTEM_H) coretypes.h $(CONFIG_H) $(TARGET_H) \
$(GGC_H) \
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
$(srcdir)/../include/hashtab.h $(srcdir)/../include/splay-tree.h
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 09:03:42 +01:00
cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h \
c-pragma.h toplev.h output.h mbchar.h input.h diagnostic.h \
cp/operators.def $(TM_P_H)
cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) toplev.h langhooks.h \
$(LANGHOOKS_DEF_H) c-common.h
cp/decl.o: cp/decl.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h cp/decl.h stack.h \
output.h $(EXPR_H) except.h toplev.h $(HASHTAB_H) $(RTL_H) \
cp/operators.def $(TM_P_H) tree-inline.h diagnostic.h c-pragma.h \
debug.h gt-cp-decl.h gtype-cp.h timevar.h
cp/decl2.o: cp/decl2.c $(CXX_TREE_H) $(TM_H) flags.h cp/lex.h cp/decl.h $(EXPR_H) \
output.h except.h toplev.h $(RTL_H) c-common.h gt-cp-decl2.h
cp/typeck2.o: cp/typeck2.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h output.h $(TM_P_H) \
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 15:48:04 +02:00
diagnostic.h
cp/typeck.o: cp/typeck.c $(CXX_TREE_H) $(TM_H) flags.h $(RTL_H) $(EXPR_H) toplev.h \
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 15:48:04 +02:00
diagnostic.h
cp/class.o: cp/class.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h $(RTL_H) $(TARGET_H)
cp/call.o: cp/call.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h $(RTL_H) $(EXPR_H) \
diagnostic.h gt-cp-call.h
cp/friend.o: cp/friend.c $(CXX_TREE_H) $(TM_H) flags.h $(RTL_H) toplev.h $(EXPR_H)
cp/init.o: cp/init.c $(CXX_TREE_H) $(TM_H) flags.h $(RTL_H) $(EXPR_H) toplev.h \
except.h
cp/method.o: cp/method.c $(CXX_TREE_H) $(TM_H) toplev.h $(RTL_H) $(EXPR_H) \
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-19 01:35:40 +02:00
$(TM_P_H) $(TARGET_H)
cp/cvt.o: cp/cvt.c $(CXX_TREE_H) $(TM_H) cp/decl.h flags.h toplev.h convert.h
cp/search.o: cp/search.c $(CXX_TREE_H) $(TM_H) stack.h flags.h toplev.h $(RTL_H)
cp/tree.o: cp/tree.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h $(RTL_H) \
insn-config.h integrate.h tree-inline.h real.h gt-cp-tree.h $(TARGET_H)
cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(TM_H)
cp/rtti.o: cp/rtti.c $(CXX_TREE_H) $(TM_H) flags.h toplev.h
cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) flags.h $(RTL_H) except.h toplev.h \
cp/cfns.h $(EXPR_H) libfuncs.h tree-inline.h
cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(RTL_H) flags.h $(EXPR_H) toplev.h \
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 21:53:56 +01:00
except.h $(TM_P_H)
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 09:03:42 +01:00
cp/pt.o: cp/pt.c $(CXX_TREE_H) $(TM_H) cp/decl.h cp/lex.h \
toplev.h $(RTL_H) except.h tree-inline.h gt-cp-pt.h
cp/error.o: cp/error.c $(CXX_TREE_H) $(TM_H) toplev.h diagnostic.h flags.h real.h \
$(LANGHOOKS_DEF_H)
cp/repo.o: cp/repo.c $(CXX_TREE_H) $(TM_H) toplev.h diagnostic.h \
gt-cp-repo.h
cp/semantics.o: cp/semantics.c $(CXX_TREE_H) $(TM_H) cp/lex.h except.h toplev.h \
flags.h debug.h output.h $(RTL_H) $(TIMEVAR_H) $(EXPR_H) \
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 04:48:47 +02:00
tree-inline.h
cp/dump.o: cp/dump.c $(CXX_TREE_H) $(TM_H) tree-dump.h
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) $(TM_H) rtl.h integrate.h insn-config.h \
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 04:48:47 +02:00
input.h $(PARAMS_H) debug.h tree-inline.h
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) $(TM_H) toplev.h real.h
configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. * configure.in: If not NO_MINUS_C_MINUS_O, substitute OUTPUT_OPTION with '-o $@'. Make zlibdir, zlibinc relative to top level. Kill oldstyle_subdirs. Do not include $srcdir/$s/Makefile.in in all_lang_makefiles, but do include $outputs. Do not run configure.lang from config.status. Rearrange warning-flag logic to correspond to what the makefile wants. Put special vax stage1 options in @stage1_flags@ not @stage1_warn_cflags@. Don't do anything with extra_c_objs, extra_cxx_objs, or extra_cpp_objs. (--enable-c-cpplib): AC_SUBST(maybe_cpplib) with "libcpp.a" if switch is given, nothing otherwise. * configure.lang: Delete. * Makefile.in: Expunge all traces of extra_c_objs, extra_cxx_objs, and extra_cpp_objs. Set MAYBE_CPPLIB from @maybe_cpplib@. Add $(MAYBE_CPPLIB) to C_AND_OBJC_OBJS. Set warning options via a three level scheme so that -pedantic and -Wtraditional are not used for non-C front ends: LOOSE_WARN, STRICT1_WARN, STRICT2_WARN -> $(@D)-warn, GCC_WARN_CFLAGS -> WARN_CFLAGS. Distinguish STAGE1_CFLAGS from BOOT_CFLAGS. Add -I$(@D) and -I$(srcdir)/$(@D) to INCLUDES. Set OUTPUT_OPTION, ZLIB, ZLIBINC. Do not set P, LANG_FLAGS_TO_PASS. Add OUTPUT_OPTION to all object-file generation rules. Wrap all rules that change the current directory in parentheses; pmake doesn't spawn a new shell for each command. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add libgcc_s$(SHLIB_EXT) to files deleted on make clean. Force OUTPUT_OPTION='-o $@' in stage2 and beyond. * cp/Make-lang.in, f/Make-lang.in, java/Make-lang.in, objc/Make-lang.in: Wrap all rules that change the current directory in parentheses. Expunge all references to $(P). When one command depends on another and they're run all at once, use && to separate them, not ;. Add OUTPUT_OPTION to all object-file generation rules. Delete obsolete variables. Move all build rules here from the corresponding Makefile.in and adapt to the new environment. * cp/Makefile.in, f/Makefile.in, java/Makefile.in, objc/Makefile.in: Delete. * cp/config-lang.in, f/config-lang.in, java/config-lang.in: Delete outputs= line. From-SVN: r37088
2000-10-27 22:22:28 +02:00
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 09:03:42 +01:00
cp/parser.o: cp/parser.c $(CXX_TREE_H) $(TM_H) diagnostic.h gt-cp-parser.h output.h
cp/name-lookup.o: cp/name-lookup.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(CXX_TREE_H) timevar.h gt-cp-name-lookup.h