Commit Graph

503 Commits

Author SHA1 Message Date
Mark Mitchell 7a4e509111 decl2.c (do_nonmember_using_decl): Allow `extern "C"' declarations from different namespaces to be combined.
* decl2.c (do_nonmember_using_decl): Allow `extern "C"'
	declarations from different namespaces to be combined.

From-SVN: r37254
2000-11-04 18:47:16 +00:00
Mark Mitchell ad50e811dc cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
* cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
	(linkage_kind): New enumeration.
	(decl_linkage): New function.
	* decl2.c (comdat_linkage): Extend comment.
	* error.c (dump_function_decl): Print the arguments used to
	instantiate a template, even when not printing the type of the
	function.
	* pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
	not TREE_PUBLIC, to test for external linkage.
	* tree.c (decl_linkage): New function.

From-SVN: r37150
2000-10-31 01:30:59 +00:00
Geoff Keating 7a0f14e58b decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
* decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
	* error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
	(dump_type_prefix): Print vector-of-int as 'int vector'.
	(dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
	* tree.c (walk_tree): Handle VECTOR_TYPE.

From-SVN: r37002
2000-10-22 01:38:35 +00:00
Mark Mitchell 6bcedb4e1c c-common.h (flag_no_builtin): Declare.
* c-common.h (flag_no_builtin): Declare.
	(flag_no_nonansi_builtin): Likewise.
	(c_common_nodes_and_builtins): Change prototype.
	* c-common.c (flag_no_builtin): New variable.
	(flag_no_nonansi_builtin): Likewise.
	(c_common_nodes_and_builtins): Remove parameters.  Adjust
	accordingly.
	* c-decl.c (flag_no_builtin): Remove.
	(flag_no_nonansi_builtin): Likewise.
	(init_decl_processing): Adjust call to
	c_common_nodes_and_builtins.

	* cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
	(fake_std_node): New macro.
	* decl.c (in_std): Rename to ...
	(in_fake_std): ... this.
	(flag_no_builtin): Remove.
	(flag_no_nonansi_builtin): Likewise.
	(walk_namespaces_r): Use fake_std_node.
	(push_namespace): Use std_identifier.
	(pop_namespace): Use in_fake_std.
	(lookup_name_real): Use fake_std_node.
	(init_decl_processing): When -fhonor-std, create the `std'
	namespace.  Don't create a dummy fake_std_node in that case.
	Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
	(builtin_function): Put builtins whose names don't begin
	with `_' in the std namespace.
	* decl2.c (flag_no_builtin): Remove.
	(flag_no_nonansi_builtin): Likewise.
	(set_decl_namespace): Use fake_std_node.
	(validate_nonmember_using_decl): Likewise.
	(do_using_directive): Likewise.
	(handle_class_head): Likewise.
	* dump.c (dequeue_and_dump): Likewise.
	* except.c (init_exception_processing): Use std_identifier.
	* init.c (build_member_call): Use fake_std_node.
	* rtti.c (init_rtti_processing): Use std_identifier.

From-SVN: r36940
2000-10-18 18:59:04 +00:00
Mark Mitchell 67673f5c5b c-common.c (back_end_hook): New variable.
* c-common.c (back_end_hook): New variable.
	* c-common.h (back_end_hook): Declare it.
	* c-lang.c (finish_file): Use it.

	* emit-rtl.c (init_emit_once): Initialize the const_int_htab
	earlier.

	* cp-tree.h (back_end_hook): Remove declaration.
	* decl2.c (back_end_hook): Remove definition.

	* dump.c (dequeue_and_dump): Dump TREE_USED.

From-SVN: r36928
2000-10-18 05:45:37 +00:00
Joseph Myers 74ff46299b c-common.h (warn_missing_format_attribute): New variable.
* c-common.h (warn_missing_format_attribute): New variable.
	* c-decl.c (warn_missing_format_attribute): New variable.
	(c_decode_option): Decode -Wmissing-format-attribute and
	-Wno-missing-format-attribute.
	* c-common.c (check_function_format): If
	-Wmissing-format-attribute, give a warning where a vprintf or
	vscanf function is called by a function without its own printf or
	scanf attribute.
	* toplev.c (documented_lang_options): Add
	-Wmissing-format-attribute.
	* invoke.texi: Document -Wmissing-format-attribute.

cp:
	* decl2.c (warn_missing_format_attribute): New variable.
	(lang_decode_option): Decode -Wmissing-format-attribute.

testsuite:
	* gcc.dg/format-miss-1.c: New test.

From-SVN: r36897
2000-10-17 07:52:06 +01:00
Mark Mitchell 1f8f4a0b31 Remove obstacks.
* Makefile.in (ggc-callbacks.o): Remove target.
	(flow.o): Depend on GGC_H.
	* alias.c (init_alias_analysis):
	Remove ggc_p conditionals.
	(end_alias_analysis): Likewise.
	* basic-block.h (init_flow): New function.
	(allocate_reg_life_data): Declare.
	* bb-reorder.c	(function_obstack): Replace with ...
	(flow_obstack): ... new variable.
	(fixup_reorder_chain): Use it.
	* c-decl.c (ggc_p): Remove.
	(caller-save.c): Don't call oballoc/obfree.
	* combine.c (struct
	undobuf): Remove storage.
	(try_combine): Don't call oballoc.
	(undo_all): Don't call obfree.
	* cse.c (insert): Use xmalloc, not
	oballoc.
	(cse_main): Adjust accordingly.
	* dwarf2out.c (save_rtx): Remove
	obstack code.
	(dwarf2out_init): Remove ggc_p conditionals.
	* emit-rtl.c (rtl_obstack): Remove.
	(gen_rtx_CONST_INT): Remove ggc_p conditionals.
	(make_insn_raw): Likewise.
	(emit_insn_before): Likewise.
	(emit_insn_after): Likewise.
	(emit_insn): Likewise.
	(gen_sequence): Likewise.
	(copy_insn_1): Remove handling of `b' RTL components.
	(init_emit_once): Remove ggc_p conditionals.
	* except.c (create_rethrow_ref): Don't fool with obstacks.
	(add_partial_entry): Likewise.
	(call_get_eh_context): Likewise.
	(begin_protect_partials): Likewise.
	(protect_with_terminate): Likewise.
	* explow.c
	(plus_constant_wide): Likewise.
	* expr.c (init_expr_once):
	Likewise.
	(emit_block_move): Likewise.
	(clear_storage): Likewise.
	(expand_expr): Likewise.
	* flow.c (function_obstack): Remove.
	(flow_obstack): New variable.
	(flow_firstobj): Likewise.
	(create_base_block): Use the flow_obstack.
	(split_block): Likewise.
	(split_edge): Likewise.
	(calculate_global_regs_live): Likewise.
	(allocate_bb_life_data): Make it static.  Likewiwse.
	(init_flow): New function.
	(size_int_type_wide): Remove ggc_p conditionals.
	* function.c
	(push_function_context_to): Don't call save_tree_status.
	(pop_function_context_from): Or restore_tree_status.
	(assign_stack_local_1): Don't call push_obstacks.
	(find_fixup_replacement): Use xmalloc.
	(fixup_var_refs_insns): Free the storage.
	(insns_for_mem_walk): Don't mess with obstacks.
	(instantiate_decls): Likewise.
	(trampoline_address): Likewise.
	(expand_function_end): Likewise.
	* function.h (sturct function):
	Remove obstack-related variables.
	(save_tree_status): Don't declare.
	(restore_tree_status): Likewise.
	* gcse.c (compute_can_copy):
	Don't call oballoc/obfree.
	* genattrtab.c (operate_exp): Remove
	ggc_p conditionals.
	(simplify_cond): Likewise.
	(simplify_test_exp): Don't mess with obstacks.
	(optimize_attrs): Likewise.
	* gengenrtl.c (gendef): Don't include
	ggc_p conditionals.
	* ggc-callbacks.c (ggc_p): Remove.
	* ggc-none.c (ggc_p): Remove.
	* ggc.h (ggc_p): Don't declare.
	* integrate.c (save_for_inline): Don't mess with obstacks.
	(integrate_decl_tree): Likewise.
	(output_inline_function): Likewise.
	* lists.c
	(init_EXPR_INSN_LIST_cache): Likewise.
	* loop.c (temp_obstack):
	Remove.
	(rtl_obstack): Likewise.
	(init_loop): Don't mess with obstacks.
	(reg_address_cost): Free BIVs and GIVs.
	(check_insns_for_bivs): Use xmalloc, not oballoc.
	(find_mem_givs): Likewise.
	(record_biv): Likewise.
	(general_induction_var): Likewise.
	(product_cheap_p): Likewse.
	* optabs.c (init_one_libfunc): Remove
	ggc_p conditional.
	* print-tree.c (debug_tree): Don't use
	oballoc/obfree.
	(print_node): Likewise.
	* profile.c (output_func_start_profiler):
	Remove call to temporary_allocation.
	* reload1.c
	(eliminate_regs_in_insn): Don't mess with obstacks.
	* resource.c
	(mark_target_live_regs): Use xmalloc.
	(free_resource_info): Free the memory.
	* rtl.c (rtl_obstack):
	Remove.
	(rtvec_alloc): Don't mess with obstacks.
	(rtx_alloc): Likewise.
	(rtx_free): Remove.
	(copy_rtx): Don't handle `b' cases.
	(read_rtx): Use a local rtl_obstack.
	* rtl.h (oballoc): Remove.
	(obfree): Likewise.
	(pop_obstacks): Likewise.
	(push_obstacks): Likewise.
	(allocate_bb_life_data): Likewise.
	(allocate_reg_life_data): Likewise.
	(rtx_free): Likewise.
	* sdbout.c (sdbout_queue_anonymous_type):
	Use tree_cons, not saveable_tree_cons.
	* simplify-rtx.c
	(cselib_init): Don't mess with obstacks.
	* stmt.c
	(mark_block_nesting): Mark the label_chain.
	(epxand_label): Use ggc_alloc, not oballoc.
	(clear_last_expr): Don't mess with obstacks.
	(expand_decl_cleanup): Likewise.
	(expand_dcc_cleanup): Likewise.
	(expand_dhc_cleanup): Likewise.
	(expand_anon_union_decl): Likewise.
	(add_case_node): Use xmalloc, not oballoc.
	(free_case_nodes): New function.
	(expand_end_case): Call it.
	* stor-layout.c (layout_type): Don't
	mess with obstacks.
	(layout_type): Likewise.
	* toplev.c (wrapup_global_declarations):
	Likewise.
	(compile_file): Remove ggc_p conditionals.
	(rest_of_compilation): Call init_flow.  Remove ggc_p conditionals.
	(decode_f_option): Remove ggc_p conditionals.
	* tree.c
	(function_maybepermanent_obstack): Remove.
	(maybepermanent_obstack): Likewise.
	(function_obstack): Likewise.
	(tmeporary_obstack): Likewise.
	(momentary_obstack): Likewise.
	(temp_decl_obstack): Likewise.
	(saveable_obstack): Likewise.
	(rtl_obstack): Likewise.
	(current_obstack): Likewise.
	(expression_obstack): Likewise.
	(struct obstack_stack): Likewise.
	(obstack_stack): Likewise.
	(obstack_stack_obstack): Likewise.
	(maybepermanent_firstobj): Likewise.
	(temporary_firstobj): Likewise.
	(momentary_firstobj): Likewise.
	(temp_decl_firstobj): Likewise.
	(momentary_function_firstobj): Likewise.
	(all_types_permanent): Likewise.
	(struct momentary_level): Likewise.
	(momentary_stack): Likewise.
	(init_obstacks): Remove initialization of removed obstacks.
	(save_tree_status): Remove.
	(restore_tree_status): Likewise.
	(temporary_allocation): Liekwise.
	(end_temporary_allocation): Liekwise.
	(resume_temporary_allocation): Likewise.
	(saveable_allocation): Likewise.
	(push_obstacks): Likewise.
	(push_obstacks_nochange): Likewise.
	(pop_obstacks): Likewise.
	(allocation_temporary_p): Likewise.
	(permanent_allocation): Likewise.
	(preserve_data): Likewise.
	(preserve_initializer): Likewise.
	(rtl_in_current_obstack): Likewise.
	(rtl_in_saveable_obstack): Likewise.
	(oballoc): Likewise.
	(obfree): Likewise.
	(savealloc): Likewise.
	(expralloc): Likewise.
	(print_obstack_name): Likewise.
	(debug_obstack): Likewise.
	(object_permanent_p): Likewise.
	(push_momentary): Likewise.
	(perserve_momentary): Likewise.
	(clear_momentary): Likewise.
	(pop_momentary): Likewise.
	(pop_momentary_nofree): Likewise.
	(suspend_momentary): Likewise.
	(resume_momentary): Likewise.
	(make_node): Don't set TREE_PERMANENT.
	(copy_node): Remove ggc_p conditionals.  Don't set TYPE_OBSTACK.
	Don't set TREE_PERMANENT.
	(get_identifier): Remove ggc_p conditionals.
	(build_string): Likewise.
	(make_tree_vec): Likewise.
	(build_decl_list): Remove.
	(build_expr_list): Likewise.
	(tree_cons): Remove ggc_p conditionals.
	(decl_tree_cons): Remove.
	(expr_tree_cons): Likewise.
	(perm_tree_cons): Likewise.
	(temp_tree_cons): Likewise.
	(saveable_tree_cons): Likewise.
	(build1): Remove ggc_p conditionals.
	(build_parse_node): Likewise.
	(build_type_attribute_variant): Don't mess with obstacks.
	(build_type_copy): Likewise.
	(type_hash_canon): Likewise.
	(build_pointer_type): Likewise.
	(build_reference_type): Likewise.
	(build_index_type): Likewise.
	(build_range_type): Likewise.
	(dump_tree_statistics): Don't print obstack information.
	* tree.h
	(struct tree_common): Remove permanent_flag.
	(TREE_PERMANENT): Remove.
	(TREE_SET_PERMANENT): Likewise.
	(TYPE_OBSTACK): Likewise.
	(struct tree_type): Remove obstack.
	(oballoc): Remove.
	(savealloc): Likewise.
	(build_decl_list): Likewise.
	(build_expr_list): Likewise.
	(perm_tree_cons): Likewise.
	(temp_tree_cons): Likewise.
	(saveable_tree_cons): Likewise.
	(decl_tree_cons): Likewise.
	(expr_tree_cons): Likewise.
	(suspend_momentary): Likewise.
	(allocation_temporary_p): Likewise.
	(resume_momentary): Likewise.
	(push_obstacks_nochange): Likewise.
	(permanent_allocation): Likewise.
	(push_momentary): Likewise.
	(clear_momentary): Likewise.
	(pop_momentary): Likewise.
	(end_temporary_allocation): Likewise.
	(pop_obstacks): Likewise.
	(push_obstacks): Likewise.
	(pop_momentary_nofree): LIkewise.
	(preserve_momentary): Likewise.
	(saveable_allocation): Likewise.
	(temporary_allocation): Likewise.
	(resume_temporary_allocation): Likewise.
	(perserve_initializer): Likewise.
	(debug_obstack): Likewise.
	(rtl_in_current_obstack): Likewise.
	(rtl_in_saveable_obstack): Likewise.
	(obfree): Likewise.
	* varasm.c (current_obstack): Remove.
	(saveable_obstack): Remove.
	(rtl_obstack): Remove.
	(immed_double_const): Don't mess with obstacks.
	(immed_real_cons): Likewise.
	(output_constant_def): Likewise.
	(init_varasm_status): Use xcalloc.
	(mark_pool_constant): Mark the pool constant itself.
	(free_varasm_status): Free memory.
	(decode_rtx_const): Call bzero directly, rather than expanding it
	inline.
	(record_rtx_const): Don't mess with obstacks.
	(force_const_mem): Likewise.
	* config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p
	conditionals.
	(aof_pic_entry): Likewise.
	* config/ia64/ia64.c (ia64_encode_section_info): Likewise.
	* config/m32r/m32r.c (m32r_encode_section_info): Likewise.
	* config/pa/pa.c (saveable_obstack): Remove.
	(rtl_obstack): Likewise.
	(current_obstack): Likewise.
	(output_call): Don't mess with obstacks.
	(hppa_encode_label): Remove ggc_p conditionals.
	* config/romp/romp.c (get_symref): Don't mess with obstacks.
	* config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional.
	(rs6000_encode_section_info): Likewise.
	* config/sh/sh.c (get_fpscr_rtx): Likewise.

From-SVN: r36856
2000-10-13 06:26:46 +00:00
Nathan Sidwell 509fc2779a cp-tree.h (access_kind): Fix comment typo.
* cp-tree.h (access_kind): Fix comment typo.
	* decl2.c (grokfield): Fix diagnostic typo.
	* semantics.c (finish_template_type): Fix comment typo.
	(finish_qualified_object_call_expr): Likewise.

From-SVN: r36722
2000-10-05 08:41:44 +00:00
Jason Merrill 99fada40ff * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
From-SVN: r36566
2000-09-21 17:47:55 -04:00
Geoff Keating fc928afe68 decl2.c (handle_class_head): Always push some scope even in the error case.
* decl2.c (handle_class_head): Always push some scope even
	in the error case.

From-SVN: r36467
2000-09-17 09:39:20 +00:00
Mark Mitchell 8f17b5c5cb splay-tree.c (splay_tree_predecessor): Fix typo in comment.
* splay-tree.c (splay_tree_predecessor): Fix typo in comment.

	Convert the C front-end to use function-at-a-time mode.
	* c-common.h: Include splay-tree.h.
	(C_DECLARED_LABEL_FLAG): New macro.
	(struct language_function): Add x_scope_stmt_stack and
	x_function_name_declared_p.
	(RECHAIN_STMTS): Move definition.
	(lang_statment_code_p): Likewise.
	(lang_expand_stmt): Likewise.
	(lang_expand_decl_stmt): New variable.
	(lang_expand_function_end): Likewise.
	(current_scope_stmt_stack): New function.
	(add_decl_stmt): Likewise.
	(add_scope_stmt): Likewise.
	(mark_stmt_tree): Likewise.
	(struct c_lang_decl): New structure.
	(DECL_SAVED_TREE): Define.
	(c_mark_lang_decl): New function.
	(c_expand_start_cond): Change prototype.
	(c_finish_then): New function.
	(c_finish_else): Likewise.
	(current_function_name_declared): Remove.
	(set_current_function_name_declared): Likewise.
	(mark_c_language_function): Declare.
	(case_compare): Likewise.
	(c_add_case_label): Likewise.
	(c_expand_expr): Likewise.
	(c_safe_from_p): Likewise.
	* c-common.c (lang_expand_function_end): New variable.
	(struct if_elt): Add if_stmt.
	(c_expand_start_cond): Add the if-statement to the statement-tree,
	rather than generating RTL.
	(c_finish_then): New function.
	(c_expand_start_else): Don't generate RTL.
	(c_finish_else): New function.
	(c_expand_expr_stmt): Don't generate RTL.
	(statement_code_p): Add SCOPE_STMT.
	(case_compare): New function.
	(c_add_case_label): Likewise.
	(mark_stmt_tree): Likewise.
	(c_mark_lang_decl): Likewise.
	(mark_c_language_function): Likewise.
	(c_expand_expr): Likewise.
	(c_safe_from_p): Likewise.
	* c-decl.c (c_stmt_tree): New variable
	(c_scope_stmt_stack): Likewise.
	(c_function_name_declared_p): Likewise.
	(lang_expand_expr_stmt): Remove.
	(poplevel): Don't call output_inline_function for nested
	functions.
	(pushdecl): Don't set DECL_CONTEXT for a local declaration of an
	`extern' function.
	(redeclaration_error_message): Change means of computing whether
	or not a function is nested.
	(lookup_label): Don't call label_rtx.
	(init_decl_processing): Add more GC roots.
	(start_decl): Add DECL_STMTs to the statement-tree, rather than
	calling rest_of_decl_compilation.
	(finish_decl): Don't call expand_decl.
	(store_parm_decls): Begin the statement-tree, but don't generate
	RTL.
	(finish_function): Tie off the statement-tree.  Call c_expand_body
	if appropriate.
	(c_expand_body): New function.
	(push_c_function_context): Save more information.
	(pop_c_function_contxt): Likewise.
	(copy_lang_decl): Now that we use DECL_LANG_SPECIFIC, copy it.
	(lang_mark_tree): Mark it.
	(current_stmt_tree): Adjust.
	(current_scope_stmt_stack): New function.
	(do_case): Remove.
	(set_current_name_declared): Likewise.
	(c_begin_compound_stmt): Define.
	(c_expand_decl_stmt): Likewise.
	* c-lang.c: Include rtl.h and expr.h.
	(lang_init): Set more language-specific hooks.
	* c-lex.c: Include expr.h.
	* c-parse.in: Changes throughout to add statements to the
	statement-tree, rather than generating RTL after every statement.
	* c-semantics.c (lang_expand_decl_stmt): Define.
	(add_decl_stmt): New function.
	(add_scope_stmt): Likewise.
	(finish_stmt_tree): Tweak.
	(genrtl_expr_stmt): Likewise.
	(genrtl_decl_stmt): Handle local labels, and call
	lang_expand_decl_stmt if required.
	(genrtl_for_stmt): Fix line-number handling.
	(genrtl_case_label): Handle cleanups.
	(genrtl_asm_stmt): Don't call combine_strings.
	(genrtl_compound_stmt): Simplify.
	(expand_stmt): Handle SCOPE_STMTs.
	* c-tree.h (struct lang_decl): New structure.
	(C_DECLARED_LABEL_FLAG): Remove.
	(c_begin_compound_stmt): Declare.
	(c_expand_decl_stmt): Likewise.
	(c_expand_start_case): Rename to c_start_case.
	(c_finish_case): New function.
	* c-typeck.c (start_init): Tweak setting of
	constructor_incremental.
	(c_expand_asm_operands): Tweak error-handling.  Add to the
	statement-tree.
	(c_expand_return): Add to the statement-tree.
	(c_expand_start_case): Rename to ...
	(c_start_case): ... this.
	(struct c_switch): New type.
	(switch_stack): New variable.
	(do_case): Simplify.
	(c_finish_case): New function.
	* dependence.c: Include expr.h.
	(enum dependence_type): Change spelling of enumerals.
	(check_node_dependence): Adjust.
	* expr.h (lang_safe_from_p): Declare.
	(safe_from_p): Likewise.
	* expr.c (lang_safe_from_p): New variable.
	(safe_from_p): Give it external linkage.  Use lang_safe_from_p.
	* stmt.c (expand_expr_stmt): Avoid clobberring of last_expr_type.
	* toplev.c (rest_of_decl_compilation): Robustify.
	* tree.c (contains_placeholder_p): Likewise.
	* Makefile.in: Update dependencies.
	* objc/objc-act.h: Adjust calculation of value for dummy_tree_code.
	* objc/objc-act.c: Include rtl.h, expr.h, and c-common.h.
	(objc_expand_function_end): New function.
	(finish_method_def): Use it.
	(init_objc): Initialize more language-specific hooks.
	* objc/Make-lang.in: Update dependencies.

	* cp-tree.h (struct cp_language_function): Remove
	x_scope_stmt_stack and name_declared.
	(current_scope_stmt_stack): Remove.
	(function_name_declared_p): New macro.
	(struct lang_decl_flags): Use c_lang_decl as a base class.
	(context): Remove.
	(struct lang_decl): Replace saved_tree with context.
	(DECL_FRIEND_CONTEXT): Adjust accordingly.
	(SET_DECL_FRIEND_CONTEXT): Likewise.
	(DECL_VIRTUAL_CONTEXT): Likewise.
	(DECL_SAVED_TREE): Remove.
	(C_DECLARED_LABEL_FLAG): Likewise.
	(cplus_expand_expr_stmt): Don't declare.
	(add_decl_stmt): Likewise.
	(add_scope_stmt): Likewise.
	* decl.c (mark_stmt_tree): Remove.
	(case_compare): Likewise.
	(finish_case_label): Use c_add_case_label.
	(init_decl_processing): Set more language-specific hooks.
	(build_enumerator): Fix typo in comment.
	(cplus_expand_expr_stmt): Remove.
	(mark_lang_function): Use mark_c_language_function.
	(lang_mark_tree): Use c_mark_lang_decl.
	* decl2.c: Change order of inclusion.
	* except.c: Likewise.
	* expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
	back on c_expand_expr.
	* friend.c: Include expr.h.
	* init.c: Change order of inclusion.
	* Makefile.in: Update dependencies.
	* lex.h (free_lang_decl_chain): Remove.
	* optimize.c (maybe_clone_body): Use function_name_declared_p.
	* pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
	it doesn't exist.
	(instantiate_decl): Use function_name_declared_p.
	* semantics.c (lang_expand_expr_stmt): Remove.
	(set_current_function_name_declared): Likewise.
	(current_function_name_declared): Likewise.
	(begin_compound_stmt): Use function_name_declared_p.
	(add_decl_stmt): Remove.
	(setup_vtbl_ptr): Use function_name_declared_p.
	(add_scope_stmt): Remove.
	(current_scope_stmt_stack): New function.
	(cp_expand_stmt): Don't handle SCOPE_STMTs.
	(expand_body): Use function_name_declared_p.
	* tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
	* typeck.c: Change order of includes.
	(convert_sequence): Remove.

From-SVN: r36464
2000-09-17 07:38:23 +00:00
Jason Merrill f2ae0c45c0 decl.c (maybe_deduce_size_from_array_init): Set do_default for all non-extern arrays.
* decl.c (maybe_deduce_size_from_array_init): Set do_default for
        all non-extern arrays.

        * decl.c (grokdeclarator): Complain about 'friend T' for implicit
        typenames, too.  Downgrade complaint to pedwarn.
        (xref_tag): Warn about surprising behavior of 'friend struct T'.
        * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
        'class This::Inherited'.

From-SVN: r36382
2000-09-12 21:02:52 -04:00
Mark Mitchell f444e36b2d c-common.h (genrtl_clear_out_block): Remove.
* c-common.h (genrtl_clear_out_block): Remove.
	* c-semantics.c (genrtl_clear_out_block): Remove.
	(genrtl_while_stmt): Don't call it.
	(genrtl_for_stmt): Likewise.

	* cp-tree.h (struct saved_scope): Remove x_function_parms.
	(current_function_parms): Don't define.
	(struct cp_language_function): Remove parms_stored.
	(current_function_just_assigned_this): Don't define.
	(current_function_parms_stored): Likewise.
	(static_ctors): Declare.
	(static_dtors): Likewise.
	(SF_EXPAND): Don't define.
	(expand_start_early_try_stmts): Remove declaration.
	(store_parm_decls): Likewise.
	* decl.c (static_ctors): Don't declare.
	(static_dtors): Likewise.
	(struct binding_level): Remove this_block.
	(poplevel): Remove dead code.
	(set_block): Likewise.
	(mark_binding_level): Don't mark this_block.
	(mark_saved_scope): Don't mark x_function_parms.
	(init_decl_processing): Don't add current_function_parms as a GC
	root.
	(check_function_type): Change prototype.
	(start_function): Remove RTL-generation code.
	(expand_start_early_try_stmts): Remove.
	(store_parm_decls): Give it internal linkage.  Remove
	RTL-generation code.
	(finish_function): Remove RTL-generation code.
	* decl2.c (static_ctors): Fix formatting.
	(static_dtors): Likewise.
	* method.c (use_thunk): Don't call store_parm_decls.
	(synthesize_method): Likewise.
	* optimize.c (maybe_clone_body): Likewise.
	* parse.y (fn.def2): Likewise.
	(.set_base_init): Likewise.
	(nodecls): Likewise.
	* pt.c (instantiate_decl): Likewise.
	* rtti.c (synthesize_tinfo_fn): Likewise.
	* semantics.c (genrtl_try_block): Simplify.
	(expand_body): Use genrtl_start_function and
	genrtl_finish_function.
	(genrtl_start_function): New function.
	(genrtl_finish_function): Likewise.

From-SVN: r36350
2000-09-12 06:46:00 +00:00
Mark Mitchell 56cb97339b c-common.h (add_stmt): Change prototype.
* c-common.h (add_stmt): Change prototype.
	(RECHAIN_STMTS): New macro.
	(CASE_LABEL_DECL): Likewise.
	(genrtl_case_label): Change prototype.
	(c_expand_start_case): Remove prototype.
	(build_case_label): Change prototype.
	(decl_constant_value): Declare.
	* c-common.c (check_case_value): Handle C++'s extensions to C
	semantics.
	* c-commnon.def (CASE_LABEL): Add room for the CASE_LABEL_DECL
	field.
	* c-parse.in (stmt): Adjust handling of return statements and case
	laels.
	* c-semantics.c (add_stmt): Return the new statement.
	(genrtl_return_stmt): Take the RETURN_STMT as input, not the
	returned expression.  Directly generate RTL, rather than calling
	c_expand_return.
	(genrtl_switch_stmt): Don't call c_expand_start_case.
	(build_case_label): Take the LABEL_DECL as input, too.
	(genrtl_case_label): Just call add_case_node.
	(expand_stmt): Adjust calls to genrtl_return_stmt and
	genrtl_case_label.
	* c-tree.h (c_expand_start_case): Declare.
	* c-typeck.c (decl_constant_value): Give it external linkage.
	(c_expand_return): Don't call expand_return or expand_null_return;
	use genrtl_return_stmt instead.
	* stmt.c (struct nesting): Remove num_ranges field.
	(add_case_node): Give it external linkage.
	(expand_start_case): Don't set num_ranges.
	(expand_start_case_dummy): Don't clear it.
	(pushcase): Rely on add_case_node to handle `default' labels.
	(add_case_node): Handle `default' labels.
	* tree.c (tree_int_cst_compare): New function.
	* tree.h (tree_int_cst_compare): Declare.
	(add_case_node): Likewise.

	* cp-tree.h (push_switch): Change prototype.
	(check_cp_case_value): Remove declaration.
	(decl_constant_value): Likewise.
	* decl.c (struct cp_switch): Add switch_stmt and cases.
	(case_compare): New function.
	(push_switch): Set switch_stmt.  Initialize cases.
	(pop_switch): Clean up cases.
	(define_case_label): Rename to ...
	(finish_case_label): ... this.  Do semantic analysis for case
	labels here.
	(start_function): Correct comment.
	* decl2.c (check_cp_case_value): Remove.
	* expr.c (do_case): Remove.
	* pt.c (tsubst_expr): Adjust call to finish_case_label.
	* semantics.c (genrtl_do_poplevel): Remove declaration.
	(RECHAIN_STMTS): Remove.
	(finish_break_stmt): Use build_break_stmt.
	(finish_continue_stmt): Use build_continue_stmt.
	(finish_switch_cond): Adjust condition here, rater than in
	c_expand_start_case.
	(finish_case_label): Remove.
	* typeck.c (c_expand_return): Remove.
	(c_expand_start_case): Likewise.

From-SVN: r36305
2000-09-10 21:34:41 +00:00
Zack Weinberg 0e5921e8a0 Integrated preprocessor.
top level:
	* Makefile.in: Remove all references to c-parse.gperf,
	c-gperf.h, and c-parse.h.  Remove -d from yacc command line
	generating c-parse.c.  Update dependencies.
	* c-parse.gperf, c-gperf.h: Delete.

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

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

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

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

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

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

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

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

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

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

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

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

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

From-SVN: r36216
2000-09-07 00:37:14 +00:00
Nathan Sidwell b1ce3eb24a class.c (resolve_address_of_overloaded_function): Add explanation message.
* class.c (resolve_address_of_overloaded_function): Add
	explanation message.
	* decl.c (define_case_label): Reformat explanation.
	* decl2.c (finish_static_data_member_decl): Likewise.
	(grokfield): Likewise.
	* friend.c (do_friend): Likewise.

From-SVN: r36188
2000-09-06 08:53:45 +00:00
Kriang Lerdsuwanakij a1281f4503 cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
* cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
        (TEMPLATE_TEMPLATE_PARM): Adjust comment.
        * cp-tree.h (TYPE_BINFO): Adjust comment.
        (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
        (TEMPLATE_TYPE_PARM_INDEX): Likewise.
        (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
        (TYPE_TEMPLATE_INFO): Likewise.
        (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
        * class.c (push_nested_class): Likewise.
        * decl.c (lookup_name_real): Likewise.
        (grokdeclarator): Likewise.
        (grok_op_properties): Likewise.
        (xref_tag): Likewise.
        (xref_basetypes): Likewise.
        * decl2.c (constructor_name_full): Likewise.
        (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
        (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
        * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
        (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
        (dump_type_suffix): Likewise.
        * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
        instead.
        (get_aggr_from_typedef): Likewise.
        * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
        (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
        (write_template_parm): Likewise.
        (write_template_template_parm): Check tree code instead of
        using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
        * method.c (build_overload_nested_name): Add
        BOUND_TEMPLATE_TEMPLATE_PARM.
        (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
        * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
        * pt.c (convert_template_argument): Check tree code instead of
        using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
        (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
        (for_each_template_parm): Adjust comment.
        (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
        (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
        (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
        template_args_equal to compare template template parameter cases.
        * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
        * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
        instead.
        * tree.c (copy_template_template_parm): Decide whether to create
        a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
        (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
        (copy_tree_r): Likewise.
        * typeck.c (comptypes): Likewise.  Check tree code instead of
        using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.

From-SVN: r36149
2000-09-04 21:01:39 -04:00
Nathan Sidwell 3338663bef decl2.c (arg_assoc): Deal with COMPONENT_REFs inside TEMPLATE_ID_EXPRs.
* decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
	TEMPLATE_ID_EXPRs.

From-SVN: r36132
2000-09-04 10:23:29 +00:00
Jason Merrill c7cb8979c3 typos
From-SVN: r36062
2000-08-30 06:20:22 -04:00
Theodore Papadopoulo 3add6264c6 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
From-SVN: r35895
2000-08-22 18:54:15 -04:00
Joseph Myers 93e2382f2c c-tree.h (flag_hosted): Move declaration from here...
* c-tree.h (flag_hosted): Move declaration from here...
	* c-common.h (flag_hosted): ... to here.
	(flag_noniso_default_format_attributes): New declaration.
	* c-decl.c (flag_noniso_default_format_attributes): New variable.
	(c_decode_option): Set it appropriately for options choosing
	language standard variant.
	* c-common.c (init_function_format_info): Only provide default
	format attributes if flag_hosted.  Only provide the gettext
	formats if flag_noniso_default_format_attributes.  Update
	comments.
	(check_format_info): Disable treatment of %a as a scanf flag in
	C99 mode.

cp:
	* decl.c (flag_hosted, flag_noniso_default_format_attributes): New
	variables.
	* decl2.c (lang_decode_option): Disable gettext attributes for
	-ansi.

From-SVN: r35843
2000-08-21 15:30:38 +01:00
Nathan Sidwell 7a8b13758c decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class TYPE_DECLs.
* decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
	TYPE_DECLs.

From-SVN: r35779
2000-08-18 09:49:06 +00:00
Nathan Sidwell 660812833c * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
From-SVN: r35775
2000-08-18 09:21:04 +00:00
Theodore Papadopoulo 9845b52bfb decl2.c (add_function): Reorganize.
* decl2.c (add_function): Reorganize.
        (arg_assoc): Do not consider function template decls.

From-SVN: r35653
2000-08-11 21:30:06 -04:00
Nathan Sidwell 5c1e54768f cp-tree.h (resolve_scope_to_name): Remove unused prototype.
* cp-tree.h (resolve_scope_to_name): Remove unused prototype.
	(lookup_nested_tag): Likewise.

	* decl2.c (grokfield): Fix comment to reflect many types of _DECLs
	can be produced.

From-SVN: r35634
2000-08-11 14:09:15 +00:00
Nathan Sidwell fd037e0d44 decl2.c (build_expr_from_tree, [...]): Build explicit TEMPLATE_ID_EXPR args.
* decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
	explicit TEMPLATE_ID_EXPR args.
	(build_expr_from_tree, case CALL_EXPR): Likewise.

From-SVN: r35629
2000-08-11 09:28:01 +00:00
Jason Merrill 08e72a1929 pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
* pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
        (tsubst_template_arg_vector): Likewise.

        * decl2.c (build_anon_union_vars): Choose the largest field; don't
        assume that one will be as large as the union.

From-SVN: r35581
2000-08-09 01:52:17 -04:00
Mark Mitchell 452a394bc3 cp-tree.h (add_method): Change prototype.
* cp-tree.h (add_method): Change prototype.
	* class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
	Don't double the size of the method vector in the error case.
	(handle_using_decl): Adjust call to add_method.
	(add_implicitly_declared_members): Likewise.
	(clone_function_decl): Likewise.
	* decl2.c (check_classfn): Likewise.
	* semantics.c (finish_member_declaration): Likewise.

From-SVN: r35490
2000-08-04 18:41:00 +00:00
Zack Weinberg eae5118925 decl2.c: Silently ignore -Wstrict-prototypes; warn about -Wno-strict-prototypes.
* decl2.c: Silently ignore -Wstrict-prototypes; warn about
	-Wno-strict-prototypes.

From-SVN: r35449
2000-08-03 08:26:36 +00:00
Mark Mitchell 5a728aca65 decl.c (start_cleanup_fn): Mark the function as `inline'.
* decl.c (start_cleanup_fn): Mark the function as `inline'.
	* decl2.c (get_guard): Call cp_finish_decl, not
	rest_of_decl_compilation, for local guards.
	* lex.c (do_identifier): Remove unused variable.

From-SVN: r35285
2000-07-27 04:49:17 +00:00
Nathan Sidwell 8b27e9efa0 Kill strict_prototype.
Kill strict_prototype. Backwards compatibility only for
	non NO_IMPLICIT_EXTERN_C systems.
	* cp-tree.h (flag_strict_prototype): Remove.
	(strict_prototype): Remove.
	(strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
	* decl.c (maybe_push_to_top_level): Adjust.
	(pop_from_top_level): Adjust.
	(decls_match): Only allow sloppy parm matching for ancient
	system headers.
	(init_decl_processing): Adjust.
	(grokdeclarator): Adjust.
	* decl2.c (flag_strict_prototype): Remove.
	(strict_prototype): Remove.
	(strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
	(lang_f_options): Remove "strict-prototype".
	(unsupported-options): Add "strict-prototype".
	* lex.c (do_identifier): Adjust.
	(do_scoped_id): Adjust.
	* parse.y (empty_parms): Adjust.
	* class.c (push_lang_context): Adjust.
	(pop_lang_context): Adjust.
	* typeck.c (comp_target_parms): Adjust.

From-SVN: r35254
2000-07-25 20:19:24 +00:00
Jason Merrill f49fad00d9 typeck.c (mark_addressable): Never set TREE_USED.
* typeck.c (mark_addressable): Never set TREE_USED.
        * call.c (build_call): Don't abort on calls to library functions
        that have been declared normally.

        * typeck.c (build_binary_op): Fix grammar in warning.

        * exception.cc (__eh_free): Fix prototype.

        * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.

        * decl.c (pushdecl): Handle seeing an OVERLOAD in
        IDENTIFIER_NAMESPACE_VALUE.

From-SVN: r35104
2000-07-17 17:35:46 -04:00
Mark Mitchell 089acd579b decl.c (pushtag): Don't put local classes in template functions on the local_classes list.
* decl.c (pushtag): Don't put local classes in template functions
	on the local_classes list.

	* decl2.c (get_guard): Add missing return for old ABI local
	variable case.

From-SVN: r34937
2000-07-10 06:32:58 +00:00
Nathan Sidwell a1089a8e04 * decl2.c (push_decl_namespace): Push the original namespace.
From-SVN: r34845
2000-07-03 15:43:49 +00:00
Mark Mitchell c395453cb6 cp-tree.h (struct language_function): Remove temp_name_counter.
* cp-tree.h (struct language_function): Remove temp_name_counter.
	(temp_name_counter): Remove.
	(get_temp_name): Change prototype.
	(get_guard): New function.
	(get_guard_cond): Likewise.
	(set_guard): Likewise.
	* cvt.c (build_up_reference): Adjust call to get_temp_name.
	* decl.c (expand_static_init): Use get_guard and friends to
	implement guard variables.
	* decl2.c (get_temp_name): Assume that the variables created are
	always static.
	(get_sentry): Rename to ...
	(get_guard): ... this.  Implement new ABI guard	variables.
	(get_guard_bits): New function.
	(get_guard_cond): Likewise.
	(set_guard): Likewise.
	(start_static_initialization_or_destruction): Use them.
	(do_static_initialization): Replace sentry with guard throughout.
	(do_static_destruction): Likewise.
	* init.c (create_temporary_var): Add comment.

From-SVN: r34803
2000-06-30 07:16:35 +00:00
Mark Mitchell ab76ca54bb c-common.c: Include c-common.h, not c-lex.h or c-tree.h.
* c-common.c: Include c-common.h, not c-lex.h or c-tree.h.
	* c-common.h (flag_const_strings): Declare.
	(warn_format): Likewise.
	(flag_traditional): Likewise.
	(flag_isoc99): Likewise.
	(warn_parentheses): Likewise.
	(warn_conversion): Likewise.
	(C_TYPE_OBJECT_P): Likewise.
	(C_TYPE_INCOMPLETE_P): Likewise.
	(C_TYPE_FUNCTION_P): Likewise.
	(C_TYPE_OBJECT_OR_INCOMPLETE_P): Likewise.
	(C_EXP_ORIGINAL_CODE): Likewise.
	(build_unary_op): Likewise.
	(build_binary_op): Likewise.
	(lvalue_p): Likewise.
	(default_conversion): Likewise.
	(common_type): Likewise.
	* c-tree.h (C_TYPE_OBJECT_P): Remove.
	(C_TYPE_INCOMPLETE_P): Likewise.
	(C_TYPE_FUNCTION_P): Likewise.
	(C_TYPE_OBJECT_OR_INCOMPLETE_P): Likewise.
	(C_EXP_ORIGINAL_CODE): Likewise.
	(common_type): Likewise.
	(default_conversion): Likewise.
	(build_binary_op): Likewise.
	(build_unary_op): Likewise.
	(lvalue_p): Likewise.
	(flag_const_strings): Likewise.
	(warn_format): Likewise.
	(warn_conversion): Likewise.
	(flag_traditional): Likewise.
	(flag_isoc99): Likewise.
	(warn_parentheses): Likewise.

	* cp-tree.h (flag_const_strings): Remove.
	(warn_parentheses): Likewise.
	(warn_format): Likewise.
	(common_type): Likewise.
	(default_conversion): Likewise.
	(build_binary_op): Likewise.
	(cp_build_binary_op): New macro.
	* call.c (build_new_op): Use cp_build_binary_op instead of
	build_binary_op.
	* class.c (build_vtable_entry_ref): Likewise.
	* decl.c (expand_static_init): Likewise.
	(compute_array_index_type): Likewise.
	(build_enumerator): Likewise.
	* decl2.c (delete_sanity): Likewise.
	(start_static_initialization_or_destruction): Likewise.
	* error.c (dump_type_suffix): Likewise.
	* init.c (resolve_offset_ref): Likewise.
	(build_new): Likewise.
	(build_new_1): Likewise.
	(build_vec_delete_1): Likewise.
	(build_vec_init): Likewise.
	(build_delete): Likewise.
	* rtti.c (synthesize_tinfo_fn): Likewise.
	(synthesize_tinfo_var): Likewise.
	* search.c (expand_upcast_fixups): Likewise.
	(fixup_all_virtual_upcast_offsets): Likewise.
	* typeck.c (build_array_ref): Likewise.
	(get_member_function_from_ptrfunc): Likewise.
	(build_binary_op): Add parameter.
	(pointer_int_sum): Use cp_build_binary_op.
	(pointer_diff): Likewise.
	(build_modify_expr): Likewise.
	(get_delta_difference): Likewise.
	(build_ptrmemfunc): Likewise.

From-SVN: r34796
2000-06-30 00:26:03 +00:00
Nathan Sidwell c727aa5e28 cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
* cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
	* decl.c (create_implicit_typedef): Adjust.
	* decl2.c (build_artificial_parm): Adjust.
	* method.c (implicitly_declare_fn): Adjust.
	* pt.c (push_inline_template_parms_recursive): Adjust.
	(process_template_parm): Adjust.
	(overloaded_template_name): Adjust.
	* semantics.c (finish_template_template_parm): Adjust.

From-SVN: r34780
2000-06-29 14:03:10 +00:00
Nathan Sidwell 0404d86f34 decl2.c (handle_class_head): Bash typedefs to the type's main decl.
* decl2.c (handle_class_head): Bash typedefs to the type's main
	decl.

From-SVN: r34707
2000-06-26 11:06:39 +00:00
Mark Mitchell 31f8e4f306 cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
* cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
	(BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
	(lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
	a tree, not an int.
	(THUNK_GENERATE_WITH_VTABLE_P): New macro.
	(make_thunk): Change prototype.
	(emit_thunk): Rename to use_thunk.
	(mangle_thunk): Change prototype.
	* class.c (get_derived_offset): Simplify.
	(copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
	BV_GENERATE_THUNK_WITH_VTABLE_P.
	(build_primary_vtable): Simplify.
	(add_virtual_function): Use BV_FN, rather than TREE_VALUE.
	(dfs_find_base): Remove.
	(update_vtable_entry_for_fn): Correct bug in finding the base
	where a virtual function was first declared.  Figure out whether
	or not to emit a vcall-thunk with the vtables in which it appears.
	Correct logic for deciding whether to use an ordinary thunk, or a
	vcall thunk.
	(finish_struct_1): Remove unnecssary code.
	(build_vtbl_initializer): Use ssize_int for the running counter of
	negative indices.
	(build_vtbl_initializer): Only use vcall thunks where necessary.
	Mark thunks as needing to be emitted with their vtables, or not.
	(build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
	indices.  Use size_binop.
	(dfs_build_vcall_offset_vtbl_entries): Don't rely on
	BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
	size_binop.
	(build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
	(build_vtable_entry): Mark thunks as needing to be emitted with
	their vtables, or not.
	* decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
	* decl2.c (mark_vtable_entries): Use use_thunk instead of
	emit_thunk.
	* dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
	information.
	* error.c (dump_expr): Use BV_FN.
	* mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
	not an int.
	* method.c (make_thunk): Likewise.
	(emit_thunk): Rename to use_thunk.  Allow callers to decide
	whether or not to actually emit the thunk.  Adjust for changes in
	representation of vcall offsets.
	* search.c (dfs_get_pure_virtuals): Use BV_FN.
	* semantics.c (emit_associated_thunks): New function.
	(expand_body): Use it.
	* ir.texi: Adjust decriptions of thunks.

From-SVN: r34656
2000-06-23 01:14:40 +00:00
Jason Merrill 655dc6eebf pt.c (tsubst_decl, [...]): Clear DECL_SAVED_TREE.
* pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
        (tsubst_friend_function): Copy it here.

        * decl.c (grok_op_properties): Fix typo.

        * decl2.c (delete_sanity): Clarify warning, avoid failure on
        deleting void*.

        * pt.c (check_explicit_specialization): Clarify error.

        * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
        an old OVERLOAD when we're declaring a non-function.
        (pushdecl, destroy_local_var): Check for error_mark_node.
        (warn_extern_redeclared_static): Also bail early if
        we're a CONST_DECL.
        (push_overloaded_decl): Ignore an old error_mark_node.

From-SVN: r34652
2000-06-22 16:54:48 -04:00
Jakub Jelinek 11cf4d1831 tree.h (TYPE_USER_ALIGN, [...]): Define.
* tree.h (TYPE_USER_ALIGN, DECL_USER_ALIGN): Define.
	(struct tree_type, struct tree_decl): Add user_align member.
	* stor-layout.c (layout_decl): Set DECL_USER_ALIGN.
	(place_union_field): If BIGGEST_FIELD_ALIGNMENT is defined
	and DECL_USER_ALIGN 0, cap alignment to this value.
	(place_field): Likewise.
	(finalize_type_size): Set TYPE_USER_ALIGN.
	(layout_type): Likewise.
	(initialize_sizetypes): Likewise.
	* c-common.c (decl_attributes): Set TYPE_USER_ALIGN resp.
	DECL_USER_ALIGN to 1.
	* c-decl.c (duplicate_decls): Set DECL_USER_ALIGN.
	(xfer_tag): Set TYPE_USER_ALIGN.
	(finish_struct): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN.
	(finish_enum): Likewise.
	* stmt.c (expand_decl): Set DECL_USER_ALIGN.
	(expand_anon_union_decl): Likewise.
	* tree.c (make_node): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN.
	(build_index_type): Set TYPE_USER_ALIGN.
	(build_range_type): Likewise.
	(build_common_tree_nodes_2): Likewise.
	* tm.texi (BIGGEST_FIELD_ALIGNMENT): Document the changed meaning.

ch/:
	* decl.c (init_decl_processing): Set TYPE_USER_ALIGN.
	(layout_enum): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN.
	* typeck.c (layout_chill_range_type): Set TYPE_USER_ALIGN.
	(apply_chill_field_layout): Set DECL_USER_ALIGN.
	(layout_chill_struct_type): Set TYPE_USER_ALIGN.

cp/:
	* class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
	(check_bitfield_decl, check_field_decl): Likewise.
	(build_vtbl_or_vbase_field, build_base_field): Likewise.
	(layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
	* decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
	(xfer_tag, finish_enum): Likewise.
	* decl2.c (finish_builtin_type): Likewise.
	* init.c (init_init_processing): Likewise.
	* pt.c (instantiate_class_template): Likewise.
	* rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
	* cp-tree.h (struct lang_type): Add user_align member.
	(CLASSTYPE_USER_ALIGN): Define.

f/:
	* com.c (ffecom_transform_common_): Set DECL_USER_ALIGN.
	(ffecom_transform_equiv_, ffecom_decl_field): Likewise.
	(ffecom_init_0): Set DECL_USER_ALIGN resp. TYPE_USER_ALIGN.
	(duplicate_decls): Set DECL_USER_ALIGN.

java/:
	* typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
	* parse.y (java_complete_class): Set DECL_USER_ALIGN.
	* parse.c: Rebuilt.

From-SVN: r34541
2000-06-14 07:30:09 +02:00
Kaveh R. Ghazi 5ac9118ef9 Warning fixes:
* bb-reorder.c (build_scope_forest): Initialize variable
	`curr_scope'.

	* calls.c (expand_call): Likewise for variables
	`save_pending_stack_adjust' and `save_stack_pointer_delta'.

	* i386.c (function_arg_advance, function_arg): Cast to avoid
	signed/unsigned warnings.

	* i386.h (MEMORY_MOVE_COST): Likewise.

	* ifcvt.c (cond_exec_process_if_block): Initialize variables
	`else_start' and `else_end'.

	* libgcc2.h (__eh_alloc, __eh_free): Prototype.

	* regrename.c (rr_replace_reg): Initialize variable `dest_subregno'.

ch:
	* Makefile.in (EXPR_H): New dependency variable.
	(actions.o, expr.o): Use EXPR_H.
	(lang.o): Depend on RTL_H and EXPR_H.

	* lang.c: Include rtl.h and expr.h.
	(lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.

cp:
	* decl2.c (compare_options): Don't needlessly cast away const-ness.

f:
	* com.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.

java:
	* decl.c (create_primitive_vtable): Prototype.

	* jcf-write.c (generate_bytecode_insns): Initialize variable
	`saved_context'.

	* lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.

From-SVN: r34490
2000-06-11 04:29:49 +00:00
Jason Merrill 669ec2b4f0 revert mangling patch
From-SVN: r34471
2000-06-09 12:26:24 -04:00
Mark Mitchell 657c130a99 invoke.texi: Remove documentation for -fsquangle and -fname-mangling-version.
* invoke.texi: Remove documentation for -fsquangle and
	-fname-mangling-version.

	Remove old ABI mangling code.
	* cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID and
	CPTI_TINFO_VAR_ID.
	(tinfo_decl_id): Remove.
	(tinfo_var_id): Likewise.
	(name_mangling_version): Likewise.
	(flag_do_squangling): Likewise.
	(get_vtt_name): Likewise.
	(init_method): Likewise.
	(build_overload_name): Likewise.
	(build_static_name): Likewise.
	(build_decl_overload_real): Likewise.
	(build_overload_with_type): Likewise.
	(build_destructor_name): Likewise.
	(get_id_2): Likewise.
	(get_ctor_vtbl_name): Likewise.
	(mangle_typeinfo_fn_for_type): New function.
	(mangle_java_reflection_var_for_type): Likewise.
	* call.c (build_new_method_call): Use mangle_vtt_for_type.
	* class.c (get_vtable_name): Remove.
	(get_vtt_name): Remove.
	(get_vtable_decl): Use mangle_vtbl_for_type.
	(build_vtt): Likewise.
	(build_ctor_vtbl_group): Remove old ABI mangling support.
	* decl.c (pushtag): Likewise.
	(maybe_commonize_var): Use set_mangled_name_for_decl.
	(grokfndecl): Remove old ABI mangling support.
	(grokvardecl): Likewise.
	(grokdeclarator): Likewise.
	(grok_op_properties): Adjust use of DEF_OPERATOR.
	* decl2.c (name_mangling_version): Remove.
	(lang_f_options): Remove squangle.
	(unsupported_options): Add squangle.
	(lang_decode_options): Don't set flag_do_squangling.  Issue a
	warning for -fname-mangling-version.
	(grokclassfn): Remove old ABI mangling support.
	(finish_static_data_member_decl): Likewise.
	(grokfield): Likewise.
	(grokoptypename): Likewise.
	(get_sentry): Likewise.
	* init.c (build_java_class_ref): Use
	mangle_java_reflection_var_for_type.
	* lex.c (init_operators): Adjust use of DEF_OPERATOR.
	(init_parse): Call init_mangle, not init_method.
	* mangle.c (write_special_name_constructor): Handle
	maybe-in-charge constructors.
	(write_special_name_destructor): Handle
	maybe-in-charge destructors.
	(write_expression): Tweak code to handle non-type template
	arguments with reference type.
	(mangle_typeinfo_fn_for_type): New function.
	(mangle_java_reflection_var_for_type): Likewise.
	(mangle_conv_op_name_for_type): Don't use a name that the user
	could type.
	* method.c (enum mangling_flags): Remove.
	(mangling_flags): Likewise.
	(obstack_chunk_alloc): Likewise.
	(obstack_chunk_free): Likewise.
	(OB_INIT): Likewise.
	(OB_PUTC): Likewise.
	(OB_PUTC2): Likewise.
	(OB_PUTS): Likewise.
	(OB_PUTID): Likewise.
	(OB_PUTCP): Likewise.
	(OB_FINISH): Likewise.
	(OB_LAST): Likewise.
	(btypelist): Likewise.
	(ktypelist): Likewise.
	(maxbtype): Likewise.
	(maxktype): Likewise.
	(typevec): Likewise.
	(maxtype): Likewise.
	(init_method): Likewise.
	(digit_buffer): Likewise.
	(nofold): Likewise.
	(start_squangling): Likewise.
	(end_squangling): Likewise.
	(icat): Likewise.
	(dicat): Likewise.
	(old_backref_index): Likewise.
	(flush_repeats): Likewise.
	(is_back_referenceable_type): Likewise.
	(issue_nrepeats): Likewise.
	(check_ktype): Likewise.
	(issue_ktype): Likewise.
	(build_overload_nested_name): Likewise.
	(build_underscore_int): Likewise.
	(build_overload_scope_ref): Likewise.
	(mangle_expression): Likewise.
	(build_overload_int): Likewise.
	(mangled_C9x_name): Likewise.
	(build_overload_value): Likewise.
	(build_template_template_parm_names): Likewise.
	(build_template_parm_names): Likewise.
	(build_overload_identifier): Likewise.
	(build_qualified_name): Likewise.
	(build_mangled_name_for_type_with_Gcode): Likewise.
	(build_mangled_name_for_type): Likewise.
	(build_overload_name): Likewise.
	(build_mangled_name): Likewise.
	(process_modifiers): Likewise.
	(check_btype): Likewise.
	(process_overload_item): Likewise.
	(build_static_name): Likewise.
	(build_decl_overload_real): Likewise.
	(set_mangled_name_for_decl): Remove old ABI mangling support.
	(build_typename_overload): Remove.
	(build_overload_with_type): Remove.
	(get_id_2): Remove.
	(get_ctor_vtbl_name): Remove.
	(build_destructor_name): Likewise.
	(set_mangled_name_for_decl): Likewise.
	(make_thunk): Remove old ABI mangling support.
	* operators.def: Likewise.
	* pt.c (check_explicit_specialization): Don't call
	set_mangled_name_for_template_decl.
	(lookup_template_class): Remove old ABI mangling support.
	(tsubst_friend_function): Update comment.
	(tsubst_decl): Remove old ABI mangling support.
	(tsubst_copy): Likewise.
	(set_mangled_name_for_template_decl): Remove.
	* rtti.c (init_rtti_processing): Use std_identifier.  Don't set
	tinfo_decl_id or tinfo_var_id.
	(get_tinfo_var): Use mangle_typeinfo_for_type.
	(tinfo_name): Remove old ABI mangling support.
	(get_tinfo_decl): Likewise.
	(tinfo_base_init): Likewise.
	(create_real_tinfo_var): Use a name that the user can't type.

	* tinfo2.cc (BUILTIN): Adjust to use new mangling.

From-SVN: r34458
2000-06-08 17:34:33 +00:00
Mark Mitchell 5b2abab835 c-common.h (c_language_kind): New type.
* c-common.h (c_language_kind): New type.
	(c_language): New variab.e
	* c-common.c (lang_get_alias_set): Don't put structures in
	non-zero alias sets in C++.
	* c-decl.c (c_language): Define it.
	* c-lex.c (doing_objc_thang): Remove.
	* c-tree.h (doing_objc_thang): Make it a macro.
	* objc/objc-act.c (lang_decode_option): Set c_language, not
	doing_objc_thang.

	* decl2.c (c_language): Define.

From-SVN: r34439
2000-06-06 21:54:54 +00:00
Gabriel Dos Reis 764dbbf2dd diagnostic.c (output_maximum_width): Remove.
2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>

        * diagnostic.c (output_maximum_width): Remove.
        (doing_line_wrapping): Tweak.
        (diagnostic_buffer): New object.
        (global_output_buffer): New object.
        (output_destroy_prefix): New function.
        (default_initialize_buffer): Likewise.
        (reshape_diagnostic_buffer): Likewise.
        (initialize_diagnostics): Likewise.
        (output_clear): Tweak.
        (line_wrapper_printf): Adjust call to init_output_buffer.
        (vline_wrapper_message_with_location): Likewise.  Use
        output_destroy_prefix.
        (v_message_with_decl): Likewise.

        * diagnostic.h (struct output_buffer): Constify prefix.
        (init_output_buffer, output_get_prefix): Constify.
        (diagnostic_message_length_per_line): Likewise.
        (reshape_diagnostic_buffer): Declare.
        (default_initialize_buffer): Declare.
        (initialize_diagnostics): Declare.
        (diagnostic_buffer): Declare new obbject.

        * toplev.c: #include diagnostic.h
        (display_help): Document diagnostic formatting options.
        (decode_f_option): Handle diagnostic formatting options.
        (main): Setup initialization for diagnostic messages outputter.

        * toplev.h (set_message_length): Remove.

        * Makefile.in (toplev.o): Depends upon diagnostic.h

        * invoke.texi : Document diagnostics formatting options.

cp/
2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>

        * lex.c (lang_init_options): Tweak.

        * decl2.c: Remove #inclusion of diagnostic.h
        (lang_decode_option): Move diagnostic formatting options to
        toplevel.

        * lang-options.h: Remove documentation for diagnostic options.

        * Makefile.in (lex.o): Depends upon diagnostic.h

From-SVN: r34435
2000-06-06 20:11:40 +00:00
Jason Merrill 3ae18eaf85 search.c (maybe_suppress_debug_info): Don't check CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
* search.c (maybe_suppress_debug_info): Don't check
        CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.

        * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
        here if extern_p.

        Remember instantiation context in deferred instantiations.
        * cp-tree.h (struct tinst_level): Remove.
        (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
        * pt.c (current_tinst_level): Now a tree.
        (print_template_context, push_tinst_level, pop_tinst_level,
        tinst_for_decl): Adjust.
        (reopen_tinst_level): New fn.
        (init_pt): Register current_tinst_level as a root.
        (add_pending_template): Put current_tinst_level in TREE_PURPOSE
        of the pending templates list.
        (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
        * lex.c (extract_interface_info): Adjust.
        * decl2.c (warn_if_unknown_interface): Adjust.

From-SVN: r34415
2000-06-05 20:12:40 -04:00
Alex Samuel 1f6e1acc0f Make-lang.in (CXX_SRCS): Add mangle.c.
* Make-lang.in (CXX_SRCS): Add mangle.c.
	* Makefile.in (CXX_OBJS): Add mangle.o.
	(mangle.o): New rule.

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

From-SVN: r34394
2000-06-04 21:12:27 +00:00
Mark Mitchell f9a7ae04e9 cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
* cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
	(INNERMOST_TEMPLATE_ARGS): New macro.
	(innermost_args): Remove.
	(get_innermost_template_args): New function.
	* decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
	* error.c (dump_function_decl): Be caution when using
	most_general_template.
	* method.c (build_template_parm_names):  Use
	INNERMOST_TEMPLATE_ARGS.
	* pt.c (add_to_template_args): Tidy comment
	(get_innermost_template_args): New function.
	(check_explicit_specialization): Clear DECL_INITIAL for a new
	specialization.
	(process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
	Tidy.
	(push_template_decl): Always register specializations of the most
	general template.
	(convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
	(coerce_template_parms): Likewise.
	(lookup_template_class): Likewise.
	(innermost_args): Remove.
	(tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
	(tsubst_decl): Handle tricky specializations.  Use
	get_innermost_template_args.
	(instantiate_template): Simplify handling of partial
	instantiations.
	(get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
	(most_general_template): Reimplement, in a more straightforward
	manner.
	(regenerate_decl_from_template): Tweak formatting.  Use
	TMPL_ARGS_DEPTH for clarity.
	(set_mangled_name_for_template_decl): Use INNERMOST_ARGS.

	* dump.c (dequeue_and_dump): Dump information about thunks.

From-SVN: r34384
2000-06-03 21:42:49 +00:00
Richard Henderson f3798d124f decl2.c (unsupported_options): Fix typo, make const.
* decl2.c (unsupported_options): Fix typo, make const.
        (lang_decode_option): Fix bsearch argument order.

From-SVN: r34334
2000-06-01 02:40:07 -07:00