Commit Graph

527 Commits

Author SHA1 Message Date
Mark Mitchell
3eb24f739e decl.c (init_decl_processing): Reenable inlining on trees.
* decl.c (init_decl_processing): Reenable inlining on trees.
	(finish_function): Likewise.
	* expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
	* semantics.c (simplify_aggr_init_exprs): New function.
	(expand_body): Use it.
	* tree.c (walk_tree): Special-case TARGET_EXPRs since they
	sometimes present the same sub-tree twice.

From-SVN: r30849
1999-12-09 19:13:33 +00:00
Mark Mitchell
b3a44a4c9f tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE unless...
* tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
	unless we're declaring the variable in question.

From-SVN: r30816
1999-12-07 07:49:33 +00:00
Mark Mitchell
d9b2d9da75 cp-tree.def (SCOPE_STMT): Take one operand.
* cp-tree.def (SCOPE_STMT): Take one operand.
	* cp-tree.h (SCOPE_STMT_BLOCK): New macro.
	(SCOPE_NULLIFIED_P): Redefine.
	(SCOPE_NO_CLEANUPS_P): New macro.
	(add_scope_stmt): Change prototype.
	* decl.c (poplevel): Tidy.  Warn about unused variables here.
	Record SCOPE_STMT_BLOCKs.
	(finish_function): Keep DECL_INITIAL for functions that might be
	inlined.
	* ir.texi: Document SCOPE_NO_CLEANUPS_P.
	* semantics.c: Include rtl.h.
	(add_scope_stmt): Return the new scope statement and, for an
	end-of-scope statement, its matching begin statement.  Don't set
	SCOPE_NULLIFIED_P.
	(do_pushlevel): Simplify, now that we are always
	function-at-a-time.
	(do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
	(expand_stmt): Don't call expand_start_bindings or
	expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
	* tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
	SCOPE_NULLIFIED_P.

From-SVN: r30779
1999-12-05 00:49:26 +00:00
Mark Mitchell
a09ba2e041 cp-tree.h (min_tree_cons): Remove.
* cp-tree.h (min_tree_cons): Remove.
	(scratch_ovl_cons): Likewise.
	* decl.c (saveable_obstack): Don't declare.
	(duplicate_decls): Tweak error-message.
	(initialize_local_var): Explicitly mark the definition as static.
	(finish_function): Call permanent_allocation, just so
	that the middle-end sees the obstacks it expects.
	(mark_cp_function_context): Likewise.
	* init.c (build_new): Don't use min_tree_cons.
	* lex.c (permanent_obstack): Don't declare.
	(current_obstack, saveable_obstack): Likewise.
	* spew.c (current_obstack, saveable_obstack): Likewise.
	* tree.c (current_obstack, saveable_obstack): Likewise.
	(scratch_ovl_cons): Remove.
	(build_min_nt): Don't mess with obstacks.
	(build_min): Likewise.
	(min_tree_cons): Remove
	* typeck.c (build_component_ref): Don't use scratch_ovl_cons.
	(build_x_function_call): Likewise.
	(build_c_cast): Don't use min_tree_cons.

From-SVN: r30743
1999-12-01 18:09:09 +00:00
Mark Mitchell
46e8c075d0 Make-lang.in (CXX_SRCS): Add optimize.c.
1999-11-25  Mark Mitchell  <mark@codesourcery.com>

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

From-SVN: r30669
1999-11-25 20:32:04 +00:00
Mark Mitchell
cd9f6678b3 cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
* cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
	* call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
	TREE_PERMANENT.
	* decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
	* decl2.c (lookup_arg_dependent): Use it.

	* cp-tree.h (cp_finish_decl): Change prototype.
	(finish_static_data_member_decl): Likewise.
	(push_permanent_obstack): Remove declaration.
	(push_expression_obstack): Likewise.
	(push_scratch_obstack): Likewise.
	(DECL_TEMPLATE_PARM_P): Robustify.
	(SET_DECL_TEMPLATE_PARM_P): New macro.
	* class.c (add_method): Don't manipulate obstacks.
	(finish_vtbls): Likewise.
	* cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
	* decl.c (binding_for_name): Don't manipulate obstacks.
	(maybe_push_to_top_level): Likewise.
	(pop_from_top_level): Likewise.
	(duplicate_decls): Likewise.
	(pushdecl): Likewise.
	(implicitly_declare): Likewise.
	(build_typename_type): Likewise.
	(start_decl): Likewise.
	(cp_finish_decl): Likewise.
	(finish_decl): Likewise.
	(destroy_local_static): Likewise.
	(expand_static_init): Likewise.
	(complete_array_type): Likewise.
	(grokvardecl): Likewise.
	(build_ptrmemfnc_type): Likewise.
	(grokdeclarator): Likewise.
	(xref_tag): Likewise.
	(xref_basetypes): Likewise.
	(start_enum): Likewise.
	(finish_enum): Likewise.
	(start_function): Likewise.
	(finish_function): Likewise.
	(start_method): Adjust call to cp_finish_decl.
	* decl2.c (finish_static_data_member_decl): Don't manipulate
	obstacks.
	(grokfield): Likewise.
	(grokbitfield): Likewise.
	(get_temp_name): Likewise.
	(get_sentry): Likewise.
	(fnish_file): Likewise.
	(lookup_arg_dependent): Likewise.
	* except.c (call_eh_info): Likewise.
	(push_eh_info): Likewise.
	(do_pop_exception): Likewise.
	(initialize_handler_parm): Likewise.
	(expand_end_eh_spec): Likewise.
	(alloc_eh_object): Likewise.
	(expand_throw): Likewise.
	* expr.c (extract_scalar_init): Likewise.
	* init.c (build_java_class_ref): Likewise.
	* lex.c (get_time_identifier): Likewise.
	(snarf_defarg): Likewise.
	(add_defarg_fn): Likewise.
	(is_global): Simplify.
	(do_identifier): Don't check TREE_PERMANENT.
	* method.c (emit_thunk): Don't manipulate obstacks.
	* parse.y (condition): Adjust call to cp_finish_decl.
	(primary): Likewise.
	(initdcl): Likewise.
	(initdcl0_innards): Likewise.
	(nomods_initdcl0): Likewise.
	* pt.c (push_inline_template_parms_recursive): Use
	SET_DECL_TEMPLATE_PARM_P.
	(process_template_parm): Likewise.
	(lookup_template_class): Don't manipulate obstacks.
	(instantiate_class_template): Adjust call to
	finish_static_data_member_decl.
	(tsubst_decl): Don't manipulate obstacks.
	(tsubst_expr): Likewise.
	(instantiate_template): Likewise.
	(instantiate_decl): Adjust calls to cp_finish_decl.
	* rtti.c (call_void_fn): Don't manipulate obstacks.
	(get_tinfo_var): Likewise.
	(get_tinfo_fn_unused): Likewise.
	(build_dynamic_cast_1): Likewise.
	(expand_si_desc): Likewise.
	(expand_class_desc): Likewise.
	(expand_ptr_desc): Likewise.
	(expand_attr_desc): Likewise.
	(expand_generic_desc): Likewise.
	(synthesize_tinfo_fn): Likewise.
	* search.c (expand_upcast_fixups): Likewise.
	* semantics.c (finish_asm_stmt): Likewise.
	(finish_named_return_value): Likewise.
	(begin_class_definition): Likewise.
	(finish_class_definition): Likewise.
	(finish_typeof): Likewise.
	* tree.c (build_cplus_method_type): Likewise.
	(reverse_path): Likewise.
	(copy_template_template_parm): Likewise.
	(build_expr_ptr_wrapper): Likewise.
	(push_expression_obstack): Remove.
	(push_permanent_obstack): Likewise.
	* typeck.c (mark_addressable): Likewise.

From-SVN: r30527
1999-11-14 20:29:06 +00:00
Mark Mitchell
c506ca222b call.c (build_conditional_expr): Use build_target_expr_with_type.
* call.c (build_conditional_expr): Use build_target_expr_with_type.
	(convert_like): Likewise.
	(build_over_call): Likewise.
	* cp-tree.h (build_target_expr): Remove.
	(build_target_expr_with_type): New function.
	* cvt.c (build_up_reference): Use get_target_expr.
	* decl.c (build_target_expr): Move to ...
	* tree.c (build_target_expr): Here.  Make it static.
	(build_target_expr_with_type): New function.  Set DECL_CONTEXT on
	the temporary VAR_DECLs.
	(get_target_expr): Use it.

From-SVN: r30524
1999-11-14 05:04:19 +00:00
Mark Mitchell
8dfaeb6384 Makefile.in (typeck2.o): Depend on output.h.
* Makefile.in (typeck2.o): Depend on output.h.
	* typeck2.c: Include output.h.

	* decl.c (flag_ansi): Remove declaration.

	* pt.c (tinst_level_tick): Make it static.
	(last_template_error_tick): Likewise.

	* cp-tree.h (mapcar): Remove declaration.
	(search_tree): Likewise.
	(walk_tree_fn): New typedef.
	(walk_tree): New function.
	* tree.c (bot_manip): Change prototype.  Adjust to be called via
	walk_tree.
	(bot_replace): Likewise.
	(no_linkage_helper): Likewise.
	(copy_tree_r): New function.
	(search_tree): Rename, and adjust, to become ...
	(walk_tree): New function.
	(mapcar): Remove.
	(target_remap): Remove.
	(target_remap_count): Likewise.
	(break_out_target_exprs): Use walk_tree.
	* decl.c (local_variable_p): Change prototype.
	(check_default_argument): Use walk_tree.
	* pt.c (for_each_template_parm_r): New function, split out from ...
	(for_each_template_parm): Here.  Use it, via walk_tree.

From-SVN: r30412
1999-11-05 09:26:11 +00:00
Mark Mitchell
f31c0a32f5 cp-tree.h (make_temp_vec): Remove.
* cp-tree.h (make_temp_vec): Remove.
	(make_scratch_vec): Likewise.
	* call.c (add_function_candidate): Use make_tree_vec.
	(add_conv_candidate): Likewise.
	(build_builtin_candidate): Likewise.
	(add_template_candidate_real): Likewise.
	* class.c (resolve_address_of_overloaded_function): Likewise.
	* decl.c (start_function): Don't fool with the momentary obstack.
	(finish_function): Likewise.
	* init.c (expand_direct_vtbls_init): Likewise.
	(begin_init_stmts): Likewise.
	(finish_init_stmts): Likewise.
	* pt.c (add_to_template_args): Use make_tree_vec.
	(check_explicit_specialization): Likewise.
	(coerce_template_parms): Likewise.
	(lookup_template_class): Don't fool with the momentary obstack.
	(instantiate_class_template): Likewise.
	(tsubst_template_arg_vector): Use make_tree_vec.
	(tsubst_aggr_type): Don't fool with the momentary obstack.
	(tsubst_decl): Likewise.  Use make_tree_vec.
	(try_one_overload): Likewise.
	(try_class_unification):  Don't fool with the momentary obstack.
	(get_bindings_real): Use make_tree_vec.
	(set_mangled_name_for_template_decl): Likewise.
	* rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
	* semantics.c (finish_expr_stmt): Likewise.
	(finish_do_stmt): Likewise.
	(finish_for_expr): Likewise.
	(finish_switch_cond): Likewise.
	(do_pushlevel): Likewise.
	(do_poplevel): Likewise.
	* tree.c (make_temp_vec): Remove.

From-SVN: r30225
1999-10-28 05:10:05 +00:00
Nathan Sidwell
356955cfb5 cp-tree.h (build_x_va_arg): Prototype new function.
* cp-tree.h (build_x_va_arg): Prototype new function.
	* call.c (build_x_va_arg): Define it.
	* parse.y (unary_expr): Call build_x_va_arg.

	* cp-tree.h (convert_type_from_ellipsis): Prototype new function.
	* call.c (convert_type_from_ellipsis): Define it.
	* decl.c (init_decl_processing): Set lang_type_promotes_to.

	* tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.

From-SVN: r29942
1999-10-13 08:49:54 +00:00
Franz Sirl
266f2faa84 cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
* cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
        * lex.c (cp_make_lake_type): Likewise.
        * tree.c (init_tree): Init make_lang_type_fn.

From-SVN: r29865
1999-10-08 05:50:44 +00:00
Mark Mitchell
6f80451c66 cp-tree.def (VEC_INIT_EXPR): Remove.
* cp-tree.def (VEC_INIT_EXPR): Remove.
	* cp-tree.h (struct stmt_tree): New type.
	(struct saved_scope): Remove firstobj.  Add x_saved_tree,
	x_stmt_tree.
	(class_cache_firstobj): Remove.
	(struct language_function): Remove stmts_are_full_exprs_p,
	x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
	(current_stmt_tree): New macro.
	(last_tree): Adjust.
	(last_expr_type): Likewise.
	(doing_semantic_analysis_p): Simplify.
	(stmts_are_full_exprs_p): Adjust.
	(begin_tree): Remove prototype.
	(end_tree): Likewise.
	(begin_stmt_tree): Change prototype.
	(finish_stmt_tree): Likewise.
	(building_stmt_tree): Simplify.
	* decl.c (mark_stmt_tree): New function.
	(mark_saved_scope): Use it.
	(start_function): Rearrange slightly to call begin_stmt_tree
	earlier.
	(save_function_data): Tweak.
	(finish_function): Adjust call to finish_stmt_tree.
	(mark_lang_function): Use mark_stmt_tree.
	* expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
	* init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
	(build_vec_init): Remove creation of stand-in intializer.
	* pt.c (begin_tree): Remove.
	(end_tree): Likewise.
	* semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
	(begin_compound_stmt): Handle a compound-statement outside of a
	function.
	(begin_stmt_expr): Handle a statement-expression outsidef of a
	function.
	(finish_stmt_expr): Likewise.
	(begin_class_definition): Don't call begin_tree.
	(finish_inline_definitions): Don't call end_tree.
	(begin_stmt_tree): Take a pointer to tree, not a function as input.
	(finish_stmt_tree): Likewise.
	* tree.c (search_tree): Don't handle VEC_INIT_EXPR.
	(mapcar): Likewise.

	* parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
	* parse.c: Regenerated.

	* dump.c (dqueue_and_dump): Dump bitfieldness.

From-SVN: r29786
1999-10-03 18:57:37 +00:00
Mark Mitchell
807625cf45 tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for bitfields, rather than DECL_BIT_FIELD.
* tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
	bitfields, rather than DECL_BIT_FIELD.
	* ir.texi: Document how to tell whether or not a field is a
	bitfield.

	* lex.c (make_lang_type): Fix typo in comment.

From-SVN: r29781
1999-10-03 16:04:30 +00:00
Jason Merrill
0a2c2fd1c2 class.c (class_cache_obstack, [...]): Remove.
* class.c (class_cache_obstack, class_obstack): Remove.
	(init_class_processing): Don't initialize class_obstack.
	(push_cache_obstack): Remove.
	(pushclass): Don't call it.
	* cp-tree.h: Remove prototype for push_cache_obstack.
	* decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
	(pushlevel_class): Don't push_decl_level.
	(poplevel_class): Don't pop_stack_level.
	(push_class_level_binding): Don't push_cache_obstack.
	(init_decl_processing): Don't intialize decl_obstack.
	* search.c (push_class_decls): Don't push_cache_obstack.
	* tree.c (list_hash_add): Put hash node on permanent_obstack.
	(hash_tree_cons): Don't mess with obstacks.
	(print_lang_statistics): Don't print stats for class_obstack and
	decl_obstack.

From-SVN: r29711
1999-09-29 18:52:57 -04:00
Mark Mitchell
b3ab27f3c3 cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
* cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
	(cleanup_type): Likewise.
	(search_tree): Change prototype.
	* decl.c (local_variable_p): Adjust for new interface to
	search_tree.
	(check_default_argument): Likewise.
	* error.c (dump_expr): Handle INIT_EXPR.
	* except.c (expand_throw): Don't make cleanup_type a local static.
	* expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
	* init.c (build_new): Call build_new_1 directly, rather than
	building a NEW_EXPR.
	(build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
	processing file-scope initializers.
	* lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
	* tree.c: Include splay-tree.h
	(no_linkage_helper): Adjust for new interface to search_tree.
	(search_tree): Pass around pointers to tree nodes, rather than the
	nodes themselves.  Handle VEC_INIT_EXPR.
	(no_linkage_check): Adjust for new interface to search_tree.
	(mapcar): Handle VEC_INIT_EXPR.
	(target_remap): New variable.
	(bot_manip): Use it.
	(bot_replace): New function.
	(break_out_target_exprs): Use it to remap all variables used in a
	default argument expression.
	* typeck.c (build_modify_expr): Don't crash when outside a
	function and presented with an INIT_EXPR assignment
	* Makefile.in (tree.o): Depend on splay-tree.h.

From-SVN: r29659
1999-09-24 20:54:08 +00:00
Mark Mitchell
371534a917 decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
* decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
	* pt.c (tsubst_copy): Likewise.
	* tree.c (search_tree): Likewise.
	(mapcar): Likewise.

From-SVN: r29440
1999-09-15 22:49:33 +00:00
Mark Mitchell
9263e6d6cd decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
* decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
	TARGET_EXPR.
	* call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
	the TARGET_EXPR.
	* cvt.c (build_up_reference): Likewise.
	* tree.c (build_cplus_new): Likewise.
	(get_target_expr): Likewise.

From-SVN: r29426
1999-09-15 06:09:53 +00:00
Mark Mitchell
9d85d30c20 cp-tree.h (build_target_expr): New function.
* cp-tree.h (build_target_expr): New function.
	* call.c (build_conditional_expr): Use build_target_expr.
	(convert_like): Likewise.
	(build_over_call): Likewise.
	* cvt.c (build_up_reference): Likewise.
	* decl.c (build_cleanup_on_safe_obstack): Fold into ...
	(destroy_local_var): Here.
	(build_target_expr): New function.
	* tree.c (build_cplus_new): Use it.
	(get_target_expr): Likewise.

From-SVN: r29387
1999-09-14 00:50:07 +00:00
Mark Mitchell
5868eb4e0a decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
* decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
	(init_decl_processing): Don't set TREE_PERMANENT for the
	error_mark_node.
	(start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
	(grokdeclarator): Likewise.
	(grokparms): Don't check TREE_PERMANENT when building up lists.
	* decl2.c (grokfield): Don't assert TREE_PERMANENT.
	(mark_inline_for_output): Likewise.
	* expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
	* init.c (build_offset_ref): Don't check TREE_PERMANENT.
	* lex.c (check_newline): Don't check ggc_p; it is always one.
	* pt.c (process_template_parm): Don't check TREE_PERMANENT.
	* spew.c (yylex): Don't copy_node or probe_obstacks for
	non-permanent CONSTANTs and STRINGs.
	* tree.c (build_cplus_array_type_1): Don't fuss with
	TREE_PERMANENT on ARRAY_TYPEs.

From-SVN: r29350
1999-09-12 02:45:30 +00:00
Mark Mitchell
4d6abc1c32 cp-tree.h (finish_function): Adjust prototype.
* cp-tree.h (finish_function): Adjust prototype.
	* decl.c (finish_function): Return the function compiled.
	* pt.c (instantiate_decl): Don't play games with obstacks.
	* tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
	(search_tree): Likewise.
	* typeck.c: Fix typo in comment.
	* typeck2.c (store_init_value): Add comment.

From-SVN: r29261
1999-09-10 08:52:07 +00:00
Mark Mitchell
e1b3e07d15 cp-tree.h (scratch_tree_cons): Remove.
* cp-tree.h (scratch_tree_cons): Remove.
	* call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
	and perm_tree_cons with plain tree_cons.
	* class.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* init.c: Likewise.
	* lex.c: Likewise.
	* method.c: Likewise.
	* parse.y: Likewise.
	* pt.c: Likewise.
	* repo.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* typeck.c: Likewise.
	* parse.c: Regenerated.
	* tree.c (build_srcloc): Simplify.

From-SVN: r29225
1999-09-09 06:17:13 +00:00
Mark Mitchell
2a1e9fdd03 cp-tree.h (copy_to_permanent): Remove.
* cp-tree.h (copy_to_permanent): Remove.
	(permanent_p): Likewise.
	* decl.c (building_typename_type): Don't use copy_to_permanent.
	(start_decl): Likewise.
	(grok_reference_init): Likewise.
	(cp_finish_decl): Likewise.
	* init.c (build_new_1): Don't use mapcar.
	(build_vec_delete_1): Don't use copy_to_permanent.
	(build_vec_init): Likewise.
	* parse.y (primary): Likewise.
	* parse.c: Regenerated.
	* pt.c (push_template_decl_real): Don't use copy_to_permanent.
	(lookup_template_class): Likewise.
	(tsubst_friend_function): Likewise.
	(instantiate_class_template): Likewise.
	(tsubst_decl): Likewise.
	(tsubst): Likewise.
	(instantiate_template): Likewise.
	(unify): Likewise.
	* rtti.c (get_tinfo_fn): Likewise.
	(build_dynamic_cast): Likewise.
	* semantics.c (finish_if_stmt_cond): Likewise.
	(finish_while_stmt_cond): Likewise.
	(finish_do_stmt): Likewise.
	(finish_for_cond): Likewise.
	(finish_for_expr): Likewise.
	(finish_cleanup): Likewise.
	(add_decl_stmt): Likewise.
	(finish_named_return_value): Likewise.
	(finish_qualified_call_expr): Likewise.
	* tree.c (perm_manip): Remove.
	(build_exception_variant): Don't use copy_to_permanent.
	(permanent_p): Remove.
	(copy_to_permament): Remove.
	(build_min_nt): Don't use copy_to_permanent.
	(build_min): Likewise.
	(min_tree_cons): Likewise.
	* typeckc.c (build_static_cast): Likewise.
	(build_reinterpret_cast): Likewise.
	(build_const_cast): Likewise.

From-SVN: r29211
1999-09-08 20:12:35 +00:00
Mark Mitchell
87e3dbc92a Makefile.in (tree.o): Depend on ggc.h.
* Makefile.in (tree.o): Depend on ggc.h.
	* class.c (make_method_vec): Remove.
	(free_method_vec): Likewise.
	(free_method_vecs): Remove.
	(add_method): Don't use them.
	* cp-tree.def (PTRMEM_CST): Make it longer.
	(TEMPLATE_PARM_INDEX): Make it shorter.
	* cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
	(template_parm_index): Remove RTL field.
	(ptrmem_cst): Add RTL field.
	(finish_function): Removed parameter.
	(process_next_inline): Change prototype.
	(init_cplus_unsave): Rename to init_tree.
	(binding_init): Remove.
	* decl.c (free_binding_nodes): Remove.
	(push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
	(pop_binding): Don't use free_binding_nodes.
	(free_binding_vecs): Remove.
	(store_bindings): Don't use them.
	(pop_from_top_level): Likewise.
	(lookup_namespace_name): Simplify.
	(build_typename_type): Don't use obstack_free.
	(unqualified_namespace_lookup): Simplify.
	(lookup_name_real): Simplify.
	(start_function): Remove comment about leaks.
	(finish_function): Removed nested parameter.  Call
	expand_end_bindings even when building_stmt_tree.
	Call ggc_push_context and ggc_pop_context around
	rest_of_compilation, if necessary.
	(mark_cp_function_context): Handle a NULL language-context.
	(lang_mark_false_label_stack): Fix typo.
	(lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
	TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
	pointer to method types.
	(lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
	* decl2.c (finish_objects): Adjust call to finish_function.
	(finish_static_store_duration_function): Likewise.
	(do_nonmember_using_decl): Remove call to binding_init.
	* except.c (end_anon_func): Adjust call to finish_function.
	* lex.c (mark_impl_file_chain): New function.
	(init_parse): Call init_tree, not init_cplus_unsave.
	Add GC roots.
	(cp_pramga_interface): Use xmalloc, not permalloc.
	(cp_pragma_implementation): Likewise.
	(begin_definition_of_inclass_inline): Simplify.
	(process_next_inline): Adjust prototype.
	(do_scoped_id): Don't call binding_init.
	(make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
	(emit_thunk): Adjust call to finish_function.
	(synthesize_method): Likewise.
	* parse.y (%union): Add a new `pi' variant.
	(PRE_PARSED_FUNCTION_DECL): Use it.
	(fn.defpen): Likewise.
	(fndef): Adjust call to finish_function.
	(instantiate_decl): Likewise.
	(rtti.c): Likewise.
	(semantics.c): Likewise.
	* tree.c: Include ggc.h.
	(mark_list_hash): New function.
	(binding_init): Remove.
	(init_cplus_unsave): Rename to ...
	(init_tree): This.  Add GC roots.

From-SVN: r29172
1999-09-07 16:07:42 +00:00
Jeff Law
c5c7673583 Merge in gcc2-ss-010999
From-SVN: r29150
1999-09-06 23:49:18 -06:00
Kaveh R. Ghazi
e1def31b3f cp-tree.h (fndecl_as_string, [...]): Constify a char*.
* cp-tree.h (fndecl_as_string, type_as_string,
	type_as_string_real, args_as_string, decl_as_string,
	expr_as_string, code_as_string, language_as_string,
	parm_as_string, op_as_string, assop_as_string, cv_as_string,
	lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.

	* errfn.c (cp_printer): Likewise.

	* error.c (cp_printer, fndecl_as_string, type_as_string_real,
	type_as_string, expr_as_string, decl_as_string, lang_decl_name,
	cp_file_of, code_as_string, language_as_string, parm_as_string,
	op_as_string, assop_as_string, args_as_string, cv_as_string):
	Likewise.

	* tree.c (lang_printable_name): Likewise.

From-SVN: r28968
1999-08-29 13:47:37 +00:00
Mark Mitchell
e1376b008f cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
* cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
	* tree.c (build_cplus_new): Set it.
	* expr.c (cplus_expand_expr): Use it.

From-SVN: r28915
1999-08-27 04:58:19 +00:00
Mark Mitchell
26612c795a tree.c (cplus_unsave_expr_now): Don't return a value.
1999-08-26  Mark Mitchell  <mark@codesourcery.com>

	* tree.c (cplus_unsave_expr_now): Don't return a value.

From-SVN: r28909
1999-08-27 00:51:55 +00:00
Gavin Romig-Koch
4ef8e8f542 For gcc:
* tree.c (lang_unsave_expr_now) : Correct return type.
	* tree.h (lang_unsave_expr_now) : Same.

For gcc/cp:
	* cp-tree.h (cplus_unsave_expr_now) : Correct return type.
	* tree.h (cplus_unsave_expr_now) : Same.

From-SVN: r28906
1999-08-26 20:47:25 +00:00
Jason Merrill
e271912d4b tree.c (cp_build_qualified_type_real): If we're asking for the same quals we already have, just return.
* tree.c (cp_build_qualified_type_real): If we're asking for the
	same quals we already have, just return.

From-SVN: r28886
1999-08-25 22:19:26 -04:00
Mark Mitchell
f1dedc319f cp-tree.def (SUBOBJECT): New tree node.
* cp-tree.def (SUBOBJECT): New tree node.
	* cp-tree.h (CLEANUP_P): New macro.
	(SUBOBJECT_CLEANUP): Likewise.
	(keep_next_level): Add parameter.
	(get_temp_regvar): Don't declare.
	(emit_base_init): Remove parameter.
	(expand_aggr_init): Rename to build_aggr_init.
	(expand_vec_init): Rename to build_vec_init.
	(do_pushlevel): Remove.
	(do_poplevel): Likewise.
	(finish_cleanup): New function.
	(finish_subobject): Likewise.
	(stmts_are_full_exprs_p): New variable.
	* decl.c (keep_next_level): Add parameter.
	(cp_finish_decl): Use build_aggr_init, not
	expand_aggr_init.  Use finish_expr_stmt to expand the code.
	(expand_static_init): Use tree-generating, not RTL-generating,
	functions to handle the initialization.
	(start_function): Remove dead code.  Always have a momentary
	obstack inside the function, even before hitting the first curly
	brace.
	(cplus_expand_expr_stmt): Move calls to
	expand_{start,end}_target_temps into semantics.c.
	(cp_function): Add stmts_are_full_exprs_p.
	(push_cp_function_context): Save it.
	(pop_cp_function_context): Restore it.
	* decl2.c (get_temp_regvar): Move to init.c.
	(do_static_initialization): Use build_{aggr,vec}_init.
	(do_static_destruction): Fix typo in comment.
	* dump.c (dequeue_and_dump): Handle INIT_EXPR.
	* except.c (expand_throw): Use create_temporary_var.
	* expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
	* init.c (expand_vec_init_try_block): Remove.
	(expand_vec_init_catch_clause): Likewise.
	(get_temp_regvar): New function.
	(begin_init_stmts): Likewise.
	(finish_init_stmts): Likewise.
	(perform_member_init): Use build_{aggr,vec}_init.  Build up tree
	structure here.
	(emit_base_init): Likewise.  Remove unused parameter.
	(expand_virtual_init): Likewise.
	(expand_cleanup_for_base): Use finish_subobject.
	(expand_aggr_vbase_init_1): Simplify.
	(construct_virtual_bases): Use tree-generating functions to build
	up initialization.
	(expand_aggr_init): Likewise.  Rename to build_aggr_init.
	(expand_default_init): Likewise.
	(expand_aggr_init_1): Likewise.
	(expand_vec_init): Rename to build_vec_init.
	* method.c (do_build_copy_constructor): Use tree-generating
	functions.  Don't call clear_last_expr.
	(do_build_assign_ref): Likewise.
	(synthesize_method): Call clear_last_expr here.
	* parse.y (base_init): Don't call clear_last_expr here.
	(nodecls): Likewise.
	* pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
	* semantics.c (do_pushlevel): Move to here.
	(do_poplevel): Likewise.
	(stmts_are_full_exprs_p): New variable.
	(finish_expr_stmt): Handle logic for temoprary cleanup here.
	(finish_for_stmt): Use finish_expr_stmt.
	(finish_cleanup): New function.
	(finish_function_try_block): Fix indentation.
	(finish_subobject): New function.
	(setup_vtbl_ptr): Call keep_next_level here.
	(finish_stmt_expr): Handle a block with no scope inside the
	statement-expression.
	(expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
	SUBOBJECT.
	* tree.c (search_tree): Handle INIT_EXPR.
	(mapcar): Likewise.
	* typeck.c (build_modify_expr): Don't build an RTL_EXPR.
	* typeck2.c (store_init_value): Change expand_aggr_init to
	build_aggr_init in comment.

From-SVN: r28878
1999-08-25 22:07:18 +00:00
Mark Mitchell
22e9174f54 semantics.c (finish_stmt_expr): Fix typo in comment.
* semantics.c (finish_stmt_expr): Fix typo in comment.
	* tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
	(mapcar): Likewise.
	* init.c (build_vec_delete_1): Make the children of a permanent
	BIND_EXPR permanent.
	* pt.c (register_specialization): Don't register a specialization
	more than once.

From-SVN: r28781
1999-08-20 22:07:22 +00:00
Mark Mitchell
40242ccfbd cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
* cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
	* decl2.c (build_expr_from_tree): Handle it.
	* error.c (dump_expr): Likewise.
	* pt.c (for_each_template_parm): Likewise.
	(tsubst_copy): Likewise.
	* tree.c (search_tree): Likewise.
	* semantics.c (finish_pseudo_destructor_call): Create it.

From-SVN: r28760
1999-08-19 08:06:17 +00:00
Mark Mitchell
4ce3d53730 cp-tree.h (build_lang_field_decl): Remove.
* cp-tree.h (build_lang_field_decl): Remove.
	* class.c (build_vtable): Replace calls to build_lang_field_decl
	with build_lang_decl.
	(prepare_fresh_vtable): Likewise.
	(finish_struct_1): Likewise.
	(init_class_processing): Likewise.
	* decl.c (push_using_decl): Likewise.
	(init_decl_processsing): Likewise.
	(grokvardecl): Likewise.
	(build_ptrmemfunc_type): Likewise.
	(grokdeclarator): Likewise.
	(build_enumerator): Likewise.
	* decl2.c (grok_x_components): Likewise.
	(do_class_using_decl): Likewise.
	* except.c (call_eh_info): Likewise.
	* init.c (init_init_processing): Likewise.
	* rtti.c (expand_class_decl): Likewise.
	* tree.c (build_base_fields): Likewise.
	(build_vbase_pointer_fields): Likewise.
	* lex.c (build_lang_decl): Build declarations on the permanent
	obstack if we're building statmeent trees.
	(retrofit_lang_decl): Handle both the full lang_decl and also the
	smaller lang_decl_flags here.
	(build_lang_field_decl): Remove.
	* pt.c (push_template_decl_real): Issue errors for variable
	declarations that are not static members.

From-SVN: r28755
1999-08-18 20:44:14 +00:00
Richard Henderson
88049523ae tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
* tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
        (mapcar): Likewise.

From-SVN: r28754
1999-08-18 13:05:08 -07:00
Mark Mitchell
43f887f9f6 cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
* cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
	(CALL_DECLARATOR_QUALS): Likewise.
	(CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
	* decl.c (grokdeclarator): Adjust to use them.
	* decl2.c (grokfield): Likewise.
	(reparse_absdcl_as_casts): Likewise.
	* lex.c (make_call_declarator): Likewise.
	(set_quals_and_spec): Likewise.
	* pt.c (tsubst): Likewise.
	* tree.c (mapcar): Remove special hack to handle third operand of
	a CALL_EXPR.

From-SVN: r28733
1999-08-17 07:20:23 +00:00
Mark Mitchell
558475f07c cp-tree.def (STMT_EXPR): New tree node.
* cp-tree.def (STMT_EXPR): New tree node.
	* cp-tree.h (STMT_EXPR_STMT): New macro.
	(store_return_init): Change prototype.
	(finish_named_return_value): New function.
	(expand_stmt): Likewise.
	(expand_body): Likewise.
	(begin_stmt_tree): Likewise.
	(finish_stmt_tree): Likewise.
	(expanding_p): New variable.
	(last_expr_type): Likewise.
	(building_stmt_tree): New macro.
	* decl.c (start_function): Use building_stmt_tree, not
	processing_template_decl, where appropriate.
	(store_parm_decls): Likewise.
	(store_return_init): Move most of the body to semantics.c.
	(finish_function): Use building_stmt_tree.
	(finish_stmt): Clear last_expr_type here.
	(cp_function): Add expanding_p, last_tree, last_expr_type.
	(push_cp_function_context): Save them.
	(pop_cp_function_context): Restore them.
	* decl2.c (setup_vtbl_ptr): Move to semantics.c.
	* error.c (dump_expr): Handle STMT_EXPR.
	* except.c (expand_start_catch_block): Use building_stmt_tree.
	Use add_decl_stmt.
	* expr.c (cplus_expand_expr): Handle STMT_EXPR.
	(do_case): Move add_tree call to semantics.c.
	* parse.y (return_init): Use finish_named_return_value.
	(for.init.statement): Use finish_expr_stmt.
	* parse.c: Regenerated.
	* pt.c (do_pushlevel): Move to semantics.c.
	(do_poplevel): Likewise.
	(tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
	(tsubst_expr): Don't expand all the way to RTL here.  Handle
	RETURN_INIT and CTOR_INITIALIZER.
	(instantiate_decl): Call expand_body after tsubst'ing into
	DECL_SAVED_TREE.
	* semantics.c (expand_stmts): New function.
	(expanding_p): New variable.
	(last_expr_type): Likewise.
	(finish_expr_stmt): Use building_stmt_tree.
	(begin_if_stmt): Likewise.
	(finish_if_stmt_cond): Likewise.
	(finish_then_clause): Likewise.
	(begin_else_clause): Likewise.
	(finish_else_clause): Likewise.
	(begin_while_stmt): Likewise.
	(finish_while_stmt_cond): Likewise.
	(finish_while_stmt): Likewise.
	(finish_do_body): Likewise.
	(finish_do_stmt): Likewise.
	(finish_return_stmt): Likewise.
	(begin_for_stmt): Likewise.
	(fnish_for_init_stmt): Likewise.
	(finish_for_cond): Likewise.
	(finish_for_expr): Likewise.
	(finish_for_stmt): Likewise.
	(finish_break_stmt): Likewise.
	(finish_continue_stmt): Likewise.
	(finish_switch_cond): Likewise.
	(finish_switch_stmt): Likewise.
	(finish_case_label): Call add_tree here if necessary.
	(finish_goto_statement): Use building_stmt_tree.
	(begin_try_block): Likewise.
	(begin_function_try_block): Likewise.
	(finish_try_block): Likewise.
	(finish_function_try_block): Likewise.
	(finish_handler_sequence): Likewise.
	(finish_function_handler_sequence): Likewise.
	(begin_handler): Likewise.
	(finish_handler_parms): Likewise.
	(finish_handler): Likewise.
	(begin_compound_stmt): Likewise.
	(finish_compound_stmt): Likewise.
	(finish_asm_stmt): Likewise.
	(finish_label_stmt): Likewise.
	(finish_named_return_value): New function.
	(setup_vtbl_ptr): Moved here from decl2.c.
	(do_pushlevel): Moved here from pt.c.
	(do_poplevel): Likewise.
	(begin_stmt_expr): Use building_stmt_tree.
	(finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
	when building_stmt_tree.
	(begin_stmt_tree): New function.
	(finish_stmt_tree): Likewise.
	(expand_stmt): Likewise.
	(expand_body): Likewise.
	* tree.c (build_cplus_method_type): Make sure the argument types
	end up on the same obstack as the METHOD_TYPE.
	(search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
	THROW_EXPR, STMT_EXPR.
	(mapcar): Break out common cases.  Handle COMPOUND_EXPR,
	MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
	sorry, if an unsupported node is encountered.
	* typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
	(c_expand_return): Don't call add_tree here.

From-SVN: r28729
1999-08-16 19:01:36 +00:00
Jason Merrill
2c169babb6 Speed up Koenig lookup.
* decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
	to return namespaces we've looked at.
	* decl2.c (lookup_using_namespace): Likewise.
	(add_function): Don't call ovl_member.
	(lookup_arg_dependent): Initialize k.namespaces to the list of
	namespaces seen in unqualified lookup.
	* call.c (equal_functions): Move here from tree.c.
	(joust): Use it to handle duplicate candidates.
	* tree.c (ovl_member): Use ==.

From-SVN: r28710
1999-08-14 07:08:53 -04:00
Mark Mitchell
9188c36364 cp-tree.def (DECL_STMT): Make it smaller.
* cp-tree.def (DECL_STMT): Make it smaller.
	* cp-tree.h (lang_decl_flags): Move saved_tree to ...
	(lang_decl): ... here.  Add next.
	(DECL_SAVED_TREE): Adjust accordingly.
	(DECL_IMPLICIT_TYPEDEF_P): New macro.
	(SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
	(DECL_STMT_DECL): Likewise.
	(create_implicit_typedef): New function.
	(maybe_push_decl): Likewise.
	(tsubst_default_argument): New function.
	(at_function_scope_p): Likewise.
	(add_decl_stmt): Likewise.
	(push_permanent_obstack): Likewise.
	* call.c (convert_default_arg): Use tsubst_default_argument.
	* class.c (add_method): Use push_permanent_obstack.
	(build_self_reference): Create a TEMPLATE_DECL for the
	self-reference, if necessary.
	* decl.c (pseudo_global_level_p): Only look at the current binding
	level.
	(push_binding): Use push_permanent_obstack.
	(create_implicit_typedef): New function.
	(pushtag): Use it.
	(duplicate_decls): Use push_permanent_obstack.
	(maybe_push_decl): New function.
	(start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
	(start_decl_1): Remove dead code.
	(cp_finish_decl): Remove DECL_STMT handling here.  Don't use
	pseudo_global_level_p.
	(grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
	template.
	(grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
	pseudo_global_level_p.
	* decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
	a template.
	(get_sentry): Use push_permanent_obstack.
	* dump.c (dequeue_and_dump): Enable DECL_STMT.
	* except.c (call_eh_info): Use push_permanent_obstack.
	(build_eh_type_ref): Likewise.
	(do_pop_exception): Likewise.
	(expand_eh_spec): Likewise.
	(alloc_eh_object): Likewise.
	(expand_throw): Likewise.
	* init.c (build_java_class_ref): Likewise.
	* lex.c (get_time_identifier): Likewise.
	(free_lang_decl_chain): Correct type.
	(retrofit_lang_decl): Adjust accordingly.
	(build_lang_field_decl): Likewise.
	* lex.h (free_lang_decl_chain): Likewise.
	* parse.y (lang_extdef): Don't use pseudo_global_level_p.
	* parse.c: Regenerated.
	* pt.c (tsubst_default_arguments): New function.
	(retrieve_local_specialization): Likewise.
	(register_local_specialization): Likewise.
	(push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
	pseudo_global_level_p to determine whether or not a template is
	primary.
	(lookup_template_class): Likewise.  Use create_implicit_typedef.
	(instantiate_class_template): Call tsubst_default_arguments for
	member functions, if appropriate.
	(tsubst_default_argument): New function.
	(tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
	* search.c (at_function_scope_p): New function.
	* semantics.c (finish_asm_stmt): Use push_permanent_obstack.
	(finish_label_stmt): Likewise.
	(add_decl_stmt): New function.
	(begin_class_definition): Likewise.
	(finish_typeof): Likewise.
	* tree.c (copy_template_template_parm): Likewise.
	(copy_to_permanent): Likewise.
	(push_permanent_obstack): Define.
	(mark_addressable): Use it.
	* typeck.c (mark_addressable): Likewise.

From-SVN: r28709
1999-08-14 09:23:49 +00:00
Gavin Romig-Koch
0a818f84ce For gcc:
tree.c (lang_unsave_expr_now) : New.
	(unsave_expr_now): Call lang_unsave_expr_now.
	tree.h (lang_unsave_expr_now) : New.

For gcc/cp:
	cp-tree.h (init_cplus_unsave): New.
	(cplus_unsave_expr_now): New.
	lex.c (init_parse): Call init_cplus_unsave.
	tree.c (init_cplus_unsave): New.
	(cplus_unsave_expr_now): New.

From-SVN: r28705
1999-08-13 18:22:59 +00:00
Mark Mitchell
6eabb2412f extend.texi (C++ Signatures): Remove node.
* extend.texi (C++ Signatures): Remove node.
	* invoke.texi: Remove discussion of -fhandle-signatures,
	signature, sigof, __signature__, and __sigof__.

	* Make-lang.in (CXX_SRCS): Remove sig.c.
	* Makefile.in (CXX_OBJS): Remove sig.o.
	(sig.o): Remove.
	* cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
	(CPTI_SIGNATURE_TYPE): Likewise.
	(CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
	(opaque_type_node): Likewise.
	(signature_type_node): Likewise.
	(sigtable_entry_type): Likewise.
	(flag_handle_signatures): Likewise.
	(lang_type): Remove is_signature, is_signature_pointer,
	is_signature_reference, has_opaque_typedecls,
	sigtables_has_been_generated.  Adjust dummy.  Remove signature,
	signature_pointer_to, signature_reference_to.
	(IS_SIGNATURE): Remove.
	(SET_SIGNATURE): Remove.
	(CLEAR_SIGNATURE): Remove.
	(IS_SIGNATURE_POINTER): Remove.
	(IS_SIGNATURE_REFERENCE): Remove.
	(SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
	(SIGTABLE_HAS_BEEN_GENERATED): Remove.
	(CLASSTYPE_SIGNATURE): Remove.
	(SIGNATURE_TYPE): Remove.
	(SIGNATURE_METHOD_VEC): Remove.
	(SIGNATURE_POINTER_TO): Remove.
	(SIGNATURE_REFERENCE_TO): Remove.
	(lang_decl_flags): Remove is_default_implementation.  Rename
	memfunc_pointer_to to saved_tree.
	(IS_DEFAULT_IMPLEMENTATION): Remove.
	(DECL_MEMFUNC_POINTER_TO): Remove.
	(DECL_MEMFUNC_POINTING_TO): Remove.
	(DECL_SAVED_TREE): Adjust definition.
	(tag_types): Remove signature_type_node.
	(SIGNATURE_FIELD_NAME): Remove.
	(SIGNATURE_FIELD_NAME_FORMAT): Likewise.
	(SIGNATURE_OPTR_NAME): Likewise.
	(SIGNATURE_SPTR_NAME): Likewise.
	(SIGNATURE_POINTER_NAME): Likewise.
	(SIGNATURE_POINTER_NAME_FORMAT): Likewise.
	(SIGNATURE_REFERENCE_NAME): Likewise.
	(SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
	(SIGTABLE_PTR_TYPE): Likewise.
	(SIGTABLE_NAME_FORMAT): Likewise.
	(SIGTABLE_NAME_FORMAT_LONG): Likewise.
	(SIGTABLE_TAG_NAME): Likewise.
	(SIGTABLE_VB_OFF_NAME): Likewise.
	(SIGTABLE_VT_OFF_NAME): Likewise.
	(finish_base_specifiers): Change prototype.
	(build_signature_pointer_type): Remove.
	(build_signature_reference_type): Remove.
	(build_signature_pointer_constructor): Remove.
	(build_signature_method_call): Remove.
	(build_optr_ref): Likewise.
	(append_signature_fields): Likewise.
	(signature_error): Likewise.
	* call.c (build_this): Remove signature support.
	(build_over_call): Likewise.
	(build_new_method_call): Likewise.
	* class.c (add_implicitly_declared_members): Likewise.
	(finish_struct_1): Likewise.
	(finish_struct): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_pointer_force): Likewise.
	(ocp_convert): Likewise.
	* decl.c (sigtable_decl_p): Remove.
	(init_decl_processing): Remove support for signatures.
	(cp_finish_decl): Likewise.
	(grokdeclarator): Likewise.
	(grokparms): Likewise.
	(xref_tag): Likewise.
	(start_function): Likewise.
	(start_method): Likewise.
	* decl2.c (finish_sigtable_vardecl): Remove.
	(flag_handle_signatures): Remove.
	(lang_f_options): Remove handle-signatures.
	(grokfield): Remove support for signatures.
	(grokbitfield): Likewise.
	(finish_file): Likewise.
	(reparse_absdcl_as_casts): Likewise.
	* error.c (dump_type_real): Likewise.
	(dump_function_decl): Likewise.
	* friend.c (make_friend_class): Likewise.
	* gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
	* hash.h: Regenerated.
	* init.c (build_new_1): Remove support for signatures.
	* lang-options.h: Remove -fhandle-signatures,
	-fno-handle-signatures.
	* lex.c (init_parse): Remove support for signatures.
	(yyprint): Likewise.
	* lex.h (rid): Remove RID_SIGNATURE.
	* method.c (build_decl_overload_real): Remove support for
	signatures.
	(hack_identifier): Likewise.
	* parse.y (base_class): Likewise.
	(base_class.1): Likewise.
	(access_specifier): Likewise.
	* search.c (lookup_member): Likewise.
	* semantics.c (finish_qualified_object_call_expr): Likewise.
	(finish_template_type_parm): Likewise.
	(begin_class_definition): Likewise.
	(finish_base_specifier): Likewise.
	* sig.c: Remove.
	* tree.c (build_cplus_method_type): Remove support for signatures.
	* typeck.c (require_complete_type): Likewise.
	(c_sizeof): Likewise.
	(c_alignof): Likewise.
	(build_object_ref): Likewise.
	(build_component_ref): Likewise.
	(build_indirect_ref): Likewise.
	(build_c_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_for_initialization): Likewise.
	* typeck2.c (signature_error): Remove.
	(store_init_value): Remove support for signatures.
	(digest_init): Likewise.
	(build_x_arrow): Likewise.
	(build_functional_cast): Likewise.
	* xref.c (GNU_xref_decl): Likewise.

From-SVN: r28677
1999-08-11 20:22:41 +00:00
Mark Mitchell
46cbda4ad4 decl.c (build_ptrmemfunc_type): Handle qualified pointer-to-member types here.
* decl.c (build_ptrmemfunc_type): Handle qualified
	pointer-to-member types here.
	* tree.c (cp_build_qualified_type_real): Simplify handling here.

From-SVN: r28642
1999-08-10 06:19:35 +00:00
Bernd Schmidt
49ad7cfa7a Include function.h in most files.
Include function.h in most files.  Remove most of the global variables
duplicated in function.h.  Add accessor macros for them which access
current_function.  Delete INLINE_HEADER rtx and related code, replace
with code using struct function to store inlining related data.

From-SVN: r28626
1999-08-09 14:00:21 +00:00
Mark Mitchell
8402fd4f4c tree.c (cp_build_qualified_type_real): Handle pointer-to-member-function types correctly.
* tree.c (cp_build_qualified_type_real): Handle
	pointer-to-member-function types correctly.

From-SVN: r28551
1999-08-06 18:25:40 +00:00
Mark Mitchell
2adeacc9b5 error.c (dump_expr): Handle EXACT_DIV_EXPR.
* error.c (dump_expr): Handle EXACT_DIV_EXPR.
	(dump_binary_op): Bulletproof.
	* lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
	* tree.c (search_tree): Don't enumerate all the nodes of classes
	`1', `2', and `<'; handle them generically.  Don't be sorry about
	"unrecognized tree codes"; just abort.
	(no_linkage_check): Don't do linkage checks for templates.

	* tree.c (cp_build_qualified_type_real): Handle
	pointer-to-member-function types correctly.

From-SVN: r28550
1999-08-06 18:20:27 +00:00
Nathan Sidwell
4cc1d46201 cp-tree.h (empty_except_spec): New global var.
* cp-tree.h (empty_except_spec): New global var.
	(compexcepttypes): Remove prototype.
	(comp_except_specs): Prototype new global function.
	(add_exception_specifier): Prototype new global function.
	* decl.c (empty_except_spec): Define new global var.
	(duplicate_decls): Use comp_except_specs, reword error message.
	(init_decl_processing): Initialize empty_except_spec.
	Adjust build_exception_variant calls.
	* parse.y (exception_specification_opt): Use empty_except_spec.
	(ansi_raise_identifier): Call check_for_new_type.
	(ansi_raise_identifiers): Use add_exception_specifier.
	* pt.c (tsubst): Use add_exception_specifier to build exception
	specifier.
	* search.c (check_final_overrider): New static function, broken
	out of get_matching_virtual. Check throw specifiers, reword
	diagnostics.
	(get_matching_virtual): Use check_final_overrider.
	* tree.c (build_exception_variant): Use comp_except_specs.
	* typeck.c (compexcepttypes): Remove.
	(comp_except_types): New static function, helper for
	comp_except_specs. Compare two types as exception specifiers.
	(comp_except_specs): New global function, compare two exception
	specifiers.
	(comptypes): Adjust for comp_except_specs.
	* typeck2.c (add_exception_specifier): New global function.

	* class.c (check_for_override): Reword error message.

From-SVN: r28494
1999-08-04 09:07:51 +00:00
Nathan Sidwell
52fb276947 call.c (convert_arg_to_ellipsis): Use pod_type_p.
* call.c (convert_arg_to_ellipsis): Use pod_type_p.
        * cp-tree.h (struct lang_type): Added non_pod_class flag.
        (CLASSTYPE_NON_POD_P): New macro to access it.
        * class.c (finish_struct_1): Determine non-PODness.
        Check for arrays of pointers (-Weffc++).
        Remove array inspection duplicated code.
        * tree.c (pod_type_p): Detect non-pod non-aggregate types.
        Use CLASSTYPE_NON_POD_P.

From-SVN: r28475
1999-08-03 15:04:49 +00:00
Mark Mitchell
83f2ccf4f8 cp-tree.h (BINFO_VIRTUALS): Document new format.
* cp-tree.h (BINFO_VIRTUALS): Document new format.
	* class.c (modify_one_vtable): Change prototype accordingly.
	(modify_all_vtables): Likewise.
	(modify_all_direct_vtables): Likewise.
	(modify_all_indirect_vtables): Likewise.
	(build_vtable_entry_for_fn): New function.
	(set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
	(modify_vtable_entry): Likewise.
	(add_virtual_function): Likewise.
	(build_vtbl_initializer): New function.
	(finish_vtbls): Simplify for new BINFO_VIRTUALS format.
	(fixup_vtable_deltas1): Likewise.
	(fixup_vtable_deltas): Likewise.
	(override_one_vtable): Likewise.
	(finish_struct_1): Likewise.
	* error.c (dump_expr): Likewise.
	* search.c (get_abstract_virtuals_1): Likewise.
	(get_abstract_virtuals): Likewise.
	(expand_upcast_fixups): Likewise.
	* tree.c (debug_binfo): Likewise.
	* decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
	__pure_virtual here.

From-SVN: r28298
1999-07-27 18:15:21 +00:00
Mark Mitchell
5bb2f1e705 tree.c (build_cplus_new): Adjust call to abstract_virtuals_error as per 1999-07-26 change.
* tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
	as per 1999-07-26 change.

	* typeck.c (c_sizeof): Don't allow non-static data members.
	(expr_sizeof): Likewise.

From-SVN: r28280
1999-07-27 01:35:35 +00:00
Mark Mitchell
27b8d0cd53 call.c (NEED_TEMPORARY_P): New macro.
* call.c (NEED_TEMPORARY_P): New macro.
	(standard_conversion): Set it, for derived-to-base conversions.
	(reference_related_p): New function.
	(reference_compatible_p): Likewise.
	(convert_class_to_reference): Likewise.
	(direct_reference_binding): Likewise.
	(reference_binding): Rework for standards-compliance.
	(convert_like): Adjust accordingly.
	(maybe_handle_ref_bind): Simplify; the right conversion sequences
	are now built up in reference_binding.
	(initialize_reference): New function.
	* cp-tree.h (ICS_USER_FLAG): Document.
	(ICS_THIS_FLAG): Likewise.
	(ICS_BAD_FLAG): Likewise.
	(NEED_TEMPORARY_P): Likewise.
	(cp_lvalue_kind): New type.
	(real_lvalue_p): Return it.
	* error.c (dump_expr): Provide more accurate representation for
	AGGR_INIT_EXPRs.
	* init.c (expand_default_init): Do not try to perform implicit
	conversions for a brace-enclosed initializer.
	* search.c (lookup_conversions): Document.
	* tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
	appropriately.
	(real_lvalue_p): Adjust accordingly.
	(lvalue_p): Likewise.
	(build_cplus_new): Don't allow the creation of an abstract class.
	* typeck.c (convert_for_initialization): Use initialize_reference.

From-SVN: r28221
1999-07-23 01:01:16 +00:00
Mark Mitchell
db3626d11f tree.c (cp_build_qualified_type_real): Rework ARRAY_TYPE allocation to match practice throughout the rest of the compiler.
* tree.c (cp_build_qualified_type_real): Rework ARRAY_TYPE
	allocation to match practice throughout the rest of the
	compiler.

From-SVN: r27264
1999-05-31 00:25:56 +00:00
Mark Mitchell
9dd03dd98b * tree.c (mapcar): Handle LVALUE_EXPR.
From-SVN: r27101
1999-05-22 11:24:43 +00:00
Mark Mitchell
adecb3f41f Make-lang.in (cc1plus): Make it depend on gxx.gperf.
* Make-lang.in (cc1plus): Make it depend on gxx.gperf.
	* cp-tree.h: Fix typo in documentation on pointers-to-members.
	(cp_build_qualified_type): Make it a macro.
	(cp_build_qualified_type_real): Declare.
	* decl.c (grokdeclarator): Remove misleading comment.  Avoid
	problem with template parameters and restrict-qualification.
	* gxx.gperf: Replace NORID with RID_UNUSED throughout.
	* hash.h: Regenerated.
	* lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
	the enumeration.
	(NORID): Remove definition.
	* pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
	(tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
	(fn_type_unification): Check that the function type resulting from
	the deduction is legal.
	(check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
	(unify): Use cp_build_qualified_type_real.
	* tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
	(cp_build_qualified_type): Rename to ...
	(cp_build_qualified_type_real): Add additional COMPLAIN parameter
	and modify appropriately.

Co-Authored-By: Nathan Sidwell <nathan@acm.org>

From-SVN: r27086
1999-05-21 15:55:56 +00:00
Jason Merrill
06126ca285 tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
* tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
	(build_cplus_new): Make sure that what we return is of the right type.

From-SVN: r27063
1999-05-20 08:17:36 -04:00
Mark Mitchell
87533b37c7 cp-tree.h (make_ptrmem_cst): New function.
* cp-tree.h (make_ptrmem_cst): New function.
	* expr.c (cplus_expand_constant): Split out from ...
	(cplus_expand_expr): Here.  Use cplus_expand_constant.
	(init_cplus_expand): Set lang_expand_constant.
	* pt.c (convert_nontype_argument): Use make_ptrmem_cst.
	* tree.c (make_ptrmem_cst): Define.
	* typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
	* typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.

From-SVN: r27060
1999-05-20 10:44:47 +00:00
Mark Mitchell
777004694d tree.c (cp_build_qualified_type): Don't allow qualified function types.
* tree.c (cp_build_qualified_type): Don't allow qualified function
	types.

From-SVN: r27021
1999-05-19 04:32:46 +00:00
Mark Mitchell
88b117b740 cp-tree.h (permanent_p): New function.
* cp-tree.h (permanent_p): New function.
	* init.c (build_new_1): Use mapcar, not copy_node, to copy a
	possibly complex tree node.
	* tree.c (mapcar): Adjust comments, and follow coding standards in
	conditional.
	(permanent_p): New function.

From-SVN: r26951
1999-05-16 19:31:51 +00:00
Jason Merrill
05e0b2f47c init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
* init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
	Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
	(resolve_offset_ref): Don't handle a raw baselink.
	* cvt.c (build_expr_type_conversion): Likewise.
	* typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
	convert_for_initialization): Likewise.
	* class.c (instantiate_type): Handle seeing a baselink under an
	OFFSET_REF.
	* error.c (dump_expr): Likewise.
	* pt.c (for_each_template_parm): Likewise.
	(resolve_overloaded_unification): Likewise.
	* tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
	* typeck.c (expr_sizeof): Also complain about other permutations
	of overloaded functions.

From-SVN: r26861
1999-05-10 08:12:58 -04:00
Brendan Kehoe
7bc2e33726 tree.c (build_exception_variant): Fix typo: use the chain of U, not trying V, while cycling through U.
* tree.c (build_exception_variant): Fix typo: use the chain of U,
	not trying V, while cycling through U.

From-SVN: r26597
1999-04-22 19:33:15 -04:00
Mark Mitchell
0aafb128c0 cp-tree.h (lang_decl_flags): Remove returns_first_arg and preserves_first_arg.
* cp-tree.h (lang_decl_flags): Remove returns_first_arg and
	preserves_first_arg.  Enlarge dummy accordingly.
	(DECL_TINFO_FN_P): New macro.
	(SET_DECL_TINO_FN_P): Likeiwse.
	(DECL_RETURNS_FIRST_ARG): Remove.
	(DECL_PRESERVES_THIS): Likewise.
	(DECL_INIT_PRIORITY): New macro.
	(finish_struct_1): Change prototype.
	(cat_namespace_levels): Remove prototype.
	(vtable_decl_p): New prototype.
	(vtype_decl_p): Likewise.
	(sigtable_decl_p): Likewise.
	(walk_globals_pred): New typedef.
	(walk_globals_fn): Likewise.
	(walk_globals): New prototype.
	(walk_namespaces_fn): New typedef.
	(walk_namespaces): New prototype.
	(wrapup_globals_for_namespace): Likewise.
	(walk_vtables): Remove prototype.
	(walk_sigtables): Likewise.
	(instantiate_pending_templates): New prototype.
	* class.c (finish_struct_1): Don't return a value.
	* decl.h (pending_statics): Remove declaration.
	* decl.c (walk_namespaces_r): New function.
	(walk_globals_r): Likewise.
	(vtable_decl_p): Likewise.
	(vtype_decl_p): Likewise.
	(sigtable_decl_p): Likewise.
	(walk_namespaces): Likewise.
	(walk_globals_data): New type.
	(walk_globals): New function.
	(wrapup_globals_for_namespace): Likewise.
	(expand_static_init): Remove assertion.  Remove redundancy in
	conditional.  Don't put static data members in static_aggregates
	Tidy.
	(finish_function): Remove redundancy in conditional.  Don't set
	DECL_RETURNS_FIRST_ARG.
	(cat_namespace_levels): Remove.
	* decl2.c: Include splay-tree.h and varray.h.
	(priority_info_s): New structure.
	(finish_vtable_vardecl): Change prototype.  Adjust for new calling
	conventions.
	(prune_vtable_vardecl): Likewise.
	(finish_sigtable_vardecl): Likewise.
	(setup_initp): Remove.
	(do_dtors): Remove.
	(do_ctors): Remove.
	(start_static_storage_duration_function): New function.
	(generate_inits_for_priority): Likewise.
	(finish_static_storage_duration_function): Likewise.
	(get_priority_info): Likewise.
	(do_static_initialization): Likewise.
	(do_static_destruction): Likewise.
	(do_static_initialization_and_destruction): Likewise.
	(generate_ctor_or_dtor_function): Likewise.
	(generate_ctor_and_dtor_functions_for_priority): Likewise.
	(pending_statics): Make it a varray.
	(pending_statics_used): New variable.
	(saved_inlines): Make it a varray.
	(saved_inlines_used): New variable.
	(finish_static_data_member): Change method of updating
	pending_statics.
	(mark_inline_for_output): Remove #if 0'd code.  Change method of
	updating saved_inlines.
	(walk_vtables): Remove.
	(walk_sigtables): Likewise.
	(import_export_decl): Use DECL_TINFO_FN_P.
	(pending_templates): Remove declaration.
	(maybe_templates): Likewise.
	(static_aggregates_initp): Likewise.
	(setup_initp): Likewise.
	(finish_objects): Simplify.
	(INITIALIZE_P_IDENTIFIER): New macro.
	(PRIORITY_IDENTIFIER): New macro.
	(SSDF_IDENTIFIER): New macro.
	(initialize_p_decl): New variable.
	(priority_decl): Likewise.
	(ssdf_decl): Likewise.
	(priority_info_map): Likewise.
	(finish_file): Recode output of static intializers and other
	file-scope finalization tasks.
	* error.c (OB_END_TEMPLATE_ID): New macro.
	(dump_type_real): Use it.
	(dump_decl): Likewise.
	(dump_function_name): Likewise.
	* lex.c (set_typedecl_interface_info): Adjust for new walk_globals
	interface.
	(check_newline): Use walk_globals, not walk_vtables.
	* pt.c (pending_tempalte_expansions): Remove.
	(set_vardecl_interface_info): Likewise.
	(pending_templates): Make static.
	(maybe_templates): Likewise.
	(instantiate_class_template): Adjust call to finish_struct_1.
	(instantiate_pending_templates): New function.
	* rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
	* tree.c (static_aggregates_initp): Remove.
	(cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
	instead.
	* Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.

From-SVN: r26594
1999-04-22 23:13:12 +00:00
Jason Merrill
9db83085a5 tweak
From-SVN: r26425
1999-04-13 18:23:19 -04:00
Jason Merrill
e5dc5fb2a5 tree.c (cp_valid_lang_attribute): New fn.
* tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
	and com_interface.
	* cp-tree.h: Add prototype.
	* decl.c (init_decl_processing): Set valid_lang_attribute.

From-SVN: r26421
1999-04-13 17:28:25 -04:00
Jason Merrill
aff08c1864 cp-tree.h (struct lang_type): Add com_interface.
* cp-tree.h (struct lang_type): Add com_interface.
	(CLASSTYPE_COM_INTERFACE): New macro.
	* class.c (set_rtti_entry): COM interface classes have no RTTI
	entries in their vtables; adjust.
	(add_virtual_function, finish_base_struct, skip_rtti_stuff,
	modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
	finish_struct_1): Likewise.
	* decl2.c (mark_vtable_entries): Likewise.
	* rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
	* search.c (get_abstract_virtuals_1, get_abstract_virtuals,
	expand_upcast_fixups): Likewise.
	* tree.c (debug_binfo): Likewise.

From-SVN: r26394
1999-04-12 20:39:32 -04:00
Mark Mitchell
4bb0968f4e cp-tree.h (BASELINK_P): New macro.
* cp-tree.h (BASELINK_P): New macro.
	(SET_BASELINK_P): Likewise.
	* init.c (build_member_call): Remove needless assignment in if
	statement.
	* search.c (lookup_field_r): Fix handling when we are looking
	specifically for a type; these are not hidden by functions and
	variables.
	(lookup_member): Use SET_BASELINK_P.
	* tree.c (is_overloaded_fn): Use BASELINK_P.
	(really_overloaed_fn): Likewise.
	(get_first_fn): Likewise.

From-SVN: r26219
1999-04-06 14:38:08 +00:00
Jason Merrill
51632249ef semantics.c (begin_inline_definitions, [...]): Rename from finish_default_args and begin_inline_definitions...
* semantics.c (begin_inline_definitions,
	finish_inline_definitions): Rename from finish_default_args and
	begin_inline_definitions, respectively, to something that isn't a
	total lie.  :)
	* parse.y (structsp): Adjust.
	* tree.c (hash_tree_cons): Remove obsolete via_* parms.
	(list_hash_lookup): Likewise.
	(hash_tree_chain): Adjust.
	* pt.c (tsubst): Adjust.
	(tsubst_arg_types): Use plain hash_tree_cons.
	* cp-tree.h (hash_tree_cons_simple): Lose.
	* parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.

From-SVN: r26092
1999-03-31 13:59:19 -05:00
Jason Merrill
9e0781b581 cp-tree.h (IDENTIFIER_AS_DESC, [...]): Remove cruft.
* cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
	CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
	CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
	CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
	CLASSTYPE_BINFO_AS_LIST): Remove cruft.
	* class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
	tree.c: Adjust.

From-SVN: r26071
1999-03-30 18:30:32 -05:00
Kaveh R. Ghazi
d8e178a02b Warning fixes:
* call.c (op_error): Const-ify a char*.
        (add_candidate, source_type, add_warning): Add static prototype.
        (print_z_candidates): Const-ify a char*.
        * class.c (resolve_address_of_overloaded_function,
        fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
        (get_vtable_name, finish_struct_1): Const-ify a char*.
        * cvt.c (convert_to_reference): Likewise.
        * decl.c (redeclaration_error_message, record_builtin_type,
        record_unknown_type, member_function_or_else, bad_specifiers):
        Likewise.
        (find_binding, select_decl, unqualified_namespace_lookup,
        lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
        Add static prototype.
        (warn_extern_redeclared_static, duplicate_decls, pushdecl,
        implicitly_declare, record_builtin_java_type, define_function,
        grok_op_properties, tag_name): Const-ify a char*.
        * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
        (define_function, finish_builtin_type): Const-ify a char*.
        (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
        cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
        (file_name_nondirectory): Const-ify a char*.
        (init_filename_times): Don't prototype.
        (compiler_error): Prototype.
        (yyerror, init_repo): Const-ify a char*.
        (build_srcloc): Don't prototype.
        (build_x_indirect_ref, build_indirect_ref, build_component_addr):
        Const-ify a char*.
        (warn_for_assignment): Don't prototype.
        (convert_for_initialization, readonly_error, check_for_new_type,
        GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
        Const-ify a char*.
        * decl2.c (acceptable_java_type, output_vtable_inherit,
        setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
        merge_functions, decl_namespace, validate_nonmember_using_decl,
        do_nonmember_using_decl): Add static prototype.
        (lang_f_options): Const-ify a char*.
        (finish_builtin_type): Likewise.
        (add_function, arg_assoc_namespace, arg_assoc_class): Add static
        prototype.
        * errfn.c: Include cp-tree.h.
        (cp_thing): Add static prototype.
        (compiler_error): Don't protoptype.
        (cp_compiler_error): Cast `compiler_error' to `errorfn' before
        passing it to `cp_thing'.
        * error.c (interesting_scope_p): Add static prototype.
        * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
        a char*.
        * init.c (compiler_error): Don't prototype.
        (member_init_ok_or_else): Const-ify a char*.
        (build_java_class_ref): Add static prototype.
        * lex.c (compiler_error): Don't prototype.
        (get_time_identifier, interface_strcmp, extend_token_buffer,
        handle_cp_pragma): Const-ify a char*.
        (is_global, init_filename_times): Add static prototype.
        (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
        (compiler_error): Change from fixed args to variable args.
        (yyerror): Const-ify a char*.
        * parse.y (cond_stmt_keyword): Const-ify a char*.
        (parse_decl): Add static prototype.
        * pt.c (template_args_equal, print_template_context): Likewise.
        (print_candidates, check_default_tmpl_args): Const-ify a char*.
        (instantiate_class_template): Likewise.
        * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
        * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
        expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
        * search.c (lookup_field_info, lookup_member): Likewise.
        (lookup_member): Cast the first argument of `bzero' to a PTR.
        * sig.c (compiler_error): Don't prototype.
        (build_signature_pointer_or_reference_nam): Const-ify a char*.
        (get_sigtable_name, build_member_function_pointer): Likewise.
        * tree.c (compiler_error): Don't prototype.
        (no_linkage_helper, build_srcloc): Add static prototype.
        (build_vbase_pointer_fields): Const-ify a char*.
        (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
        * typeck.c (compiler_error): Don't prototype.
        (convert_for_assignment): Const-ify a char*.
        (comp_cv_target_types): Add static prototype.
        (build_x_indirect_ref, build_indirect_ref, convert_arguments,
        build_component_addr, build_unary_op, convert_for_initialization):
        Const-ify a char*.
        * typeck2.c (ack): Add static prototype and change from fixed args
        to variable args.
        (readonly_error, check_for_new_type): Const-ify a char*.
        * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
        fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
        (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
        (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
        gen_assign, GNU_xref_member): Const-ify a char*.

From-SVN: r25994
1999-03-26 07:45:00 +00:00
Martin v. Löwis
44689c1277 parse.y (named_complex_class_head_sans_basetype): Do nothing for error_mark_node.
* parse.y (named_complex_class_head_sans_basetype):
	Do nothing for error_mark_node.
	(maybe_base_class_list): Likewise.
	* decl.c (start_decl): Check for error_mark_node as a type.
	Detected by g++.brendan/array-refs.C.
	(start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
	(maybe_build_cleanup_1): Likewise. Detected by
	g++.jason/incomplete1.C.
	* tree.c (build_dummy_object): Use void_zero_node instead of the
	error_mark_node
	(is_dummy_object): Check for such a node.  Detected by
	g++.bob/inherit1.C

From-SVN: r25812
1999-03-17 00:28:43 +00:00
Mark Mitchell
70c532b51d decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
* decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
	* tree.c (layout_basetypes): Not here.
	* search.c (dfs_search): Remove; no longer used.

From-SVN: r25789
1999-03-15 13:42:56 +00:00
Jason Merrill
0dd3962da5 cp-tree.h (struct lang_type): Add anon_union field.
* cp-tree.h (struct lang_type): Add anon_union field.
	(ANON_UNION_TYPE_P): Use it instead of examining type.
	(SET_ANON_UNION_TYPE_P): New macro.
	* decl.c (check_tag_decl): Use it.
	* search.c (compute_access): Handle non-type contexts earlier, and
	handle NULL_TREE.
	* tree.c (build_exception_variant): Use copy_to_permanent.

From-SVN: r25618
1999-03-06 12:41:36 -05:00
Mark Mitchell
2b0a63a35b decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when merging decls.
* decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
	merging decls.
	* pt.c (regenerate_decl_from_template): Tweak for clarity.
	(instantiate_decl): Mark a decl instantiated before regenerating
	it to avoid recursion.
	* tree.c (mapcar): Don't call decl_constant_value unless we know
	something is TREE_READONLY_DECL_P.

From-SVN: r25458
1999-02-26 12:11:43 +00:00
Kaveh R. Ghazi
834003f492 cp-tree.h (lvalue_or_else): Qualify a char* with the `const' keyword to match an analogous change at the...
* cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
        keyword to match an analogous change at the top level.
        * tree.c (lvalue_or_else): Likewise.

From-SVN: r25297
1999-02-18 20:44:21 +00:00
Jason Merrill
700466c28c pt.c (maybe_process_partial_specialization): Complain about specialization in wrong namespace.
* pt.c (maybe_process_partial_specialization): Complain about
	specialization in wrong namespace.
	* tree.c (decl_namespace_context): New fn.
g++.pt/explicit73.C
	* decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
	* pt.c (coerce_template_template_parms): Handle nested
	template template parameters.
g++.pt/nttp[12].C

From-SVN: r25072
1999-02-07 10:44:12 -05:00
Jason Merrill
0034cf7299 tree.c (equal_functions): Fix name in prototype.
* tree.c (equal_functions): Fix name in prototype.
	* decl.c (push_local_binding): Add FLAGS argument.
	(pushdecl, push_overloaded_decl): Pass it.
	* decl2.c (do_local_using_decl): Likewise.
	* cp-tree.h: Adjust prototype.
	* decl.c (poplevel): Fix logic.

From-SVN: r24869
1999-01-25 21:33:46 -05:00
Martin v. Löwis
89ae2c8c42 tree.c (equal_functions): New function.
* tree.c (equal_functions): New function.
	(ovl_member): Call it.

From-SVN: r24861
1999-01-25 16:09:05 +00:00
Mark Mitchell
7bdbfa05db cp-tree.h (PUSH_GLOBAL): New macro.
* cp-tree.h (PUSH_GLOBAL): New macro.
	(PUSH_LOCAL): Likewise.
	(PUSH_USING): Likewise.
	(namespace_bindings_p): Declare.
	(push_overloaded_decl): Likewise.
	* decl.c (push_overloaded_decl): Don't make it static.  Check for
	illegal declarations after using declarations here.
	(namespace_bindings_p): Likewise.
	(duplicate_decls): Don't consider declarations from different
	namespaces to be the same.
	(pushdecl): Use symbolic PUSH_ constants in calls to
	push_overloaded_decl.
	(push_overloaded_decl_1): Likewise.
	* decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
	(do_nonmember_using_decl): Check for illegal using declarations
	after ordinary declarations here.
	(do_local_using_decl): Call pushdecl to insert declarations.

From-SVN: r24812
1999-01-21 21:16:22 +00:00
Mark Mitchell
297e73d807 cp-tree.h (PARM_DECL_EXPR): Delete.
* cp-tree.h (PARM_DECL_EXPR): Delete.
	(convert_default_arg): Change prototype.
	(check_default_argument): Declare.
	(search_tree): Likewise.
	* call.c (convert_default_arg): Take the function to which the
	default argument belongs as a parameter, and do any necessary
	instantiation here, instead of ...
	(build_over_call): Here.
	* decl.c (local_variable_p): New function.
	(check_default_argument): Likewise, split out and tidied from ...
	(grokparms): Here.
	* error.c (dump_expr): Don't set PARM_DECL_EXPR.
	* pt.c (tsubst_call_declarator_parms): New function.
	(for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
	with CALL_EXPRs, rather than trying to be clever.
	(tsubst): Use tsubst_call_declarator_parms.
	* tree.c (search_tree): Don't make it static.
	* typeck.c (convert_arguments): Use new interface to
	convert_default_arg.

From-SVN: r24803
1999-01-21 14:29:33 +00:00
Jason Merrill
6b9b6b1509 tree.c (copy_template_template_parm): Use permanent_obstack.
* tree.c (copy_template_template_parm): Use permanent_obstack.
        * pt.c (unify): Remove restrictions on deduction of argument
        of template template parameters.
	* rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
	* class.c (resolve_address_of_overloaded_function): Show list of
	all candidates, when none of them match.

From-SVN: r24749
1999-01-18 08:32:57 -05:00
Mark Mitchell
5db698f695 decl.c (grokdeclarator): Undo 1998-12-14 change.
* decl.c (grokdeclarator): Undo 1998-12-14 change.
	* tree.c (build_cplus_array_type_1): Likewise.
	* pt.c (instantiate_class_template): Remove misleading comment.
	(tsubst_aggr_type): Substitute if there are template parameters,
	regardless of whether or not they use template arguments.
	(unify): Likewise, but for unification.

From-SVN: r24656
1999-01-13 16:27:23 +00:00
Jeff Law
c12f524223 Copyright fixes.
From-SVN: r24537
1999-01-06 13:57:36 -07:00
Jason Merrill
8d7f862cfb tree.c (bound_pmf_p): New fn.
* tree.c (bound_pmf_p): New fn.
	* typeck.c (build_c_cast): Use it.

From-SVN: r24481
1999-01-04 06:55:37 -05:00
Mark Mitchell
193306f7fd cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
1998-12-22  Mark Mitchell  <mark@markmitchell.com>
	* cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
	* tree.c (build_exception_variant): Don't crash on empty throw
	specs.

From-SVN: r24394
1998-12-22 10:33:17 +00:00
Mark Mitchell
d8f8dca15f class.c (pushclass): Tweak handling of class-level bindings.
* class.c (pushclass): Tweak handling of class-level bindings.
	(resolve_address_of_overloaded_function): Update pointer-to-member
	handling.
	(instantiate_type): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	* decl.c (pop_binding): Take the DECL to pop, not just the name.
	Deal with `struct stat' hack.
	(binding_level): Add to documentation.
	(push_binding): Clear BINDING_TYPE.
	(add_binding): New function.
	(push_local_binding): Use it.
	(push_class_binding): Likewise.
	(poplevel): Adjust calls to pop_binding.
	(poplevel_class): Likewise.
	(pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
	declarations to current binding level.
	(push_class_level_binding): Likewise.
	(push_overloaded_decl): Adjust handling of OVERLOADs in local
	bindings.
	(lookup_namespace_name): Don't crash when confronted with a
	TEMPLATE_DECL.
	(lookup_name_real): Do `struct stat' hack in local binding
	contexts.
	(build_ptrmemfunc_type): Adjust documentation.
	(grokdeclarator): Don't avoid building real array types when
	processing templates unless really necessary.
	(finish_method): Adjust calls to pop_binding.
	* decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
	not reparse_decl_as_expr.
	(build_expr_from_tree): Deal with a template-id as the function to
	call in a METHOD_CALL_EXPR.
	* pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
	(maybe_adjust_types_For_deduction): Don't do peculiar things with
	METHOD_TYPEs here.
	(resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
	pointer-to-member types where necessary.
	* tree.c (build_cplus_array_type_1): Don't avoid building real
	array types when processing templates unless really necessary.
	(build_exception_variant): Compare the exception lists correctly.

From-SVN: r24314
1998-12-14 15:35:40 +00:00
Jason Merrill
0b5be8972f update copyrights
From-SVN: r23764
1998-11-22 22:12:41 -05:00
Jason Merrill
094fe153c4 decl.c (tag_name): New fn.
* decl.c (tag_name): New fn.
	(xref_tag): Complain about using typedef-name after class-key.
Fixes Sec7/1_3/C07351.cm.
	* init.c (expand_vec_init): Also keep going if from_array.
Fixes g++.other/copy1.C.
	* tree.c (is_overloaded_fn): Also handle the output of
	build_offset_ref.
Fixes Sec5/3_3/S05162.C.
	* decl.c (grokdeclarator): Use constructor_name when comparing
	field name against enclosing class.
	* class.c (finish_struct_anon): Likewise.
Fixes Sec9/2/C09268.cm.

From-SVN: r23758
1998-11-22 16:34:27 -05:00
Jason Merrill
161c12b0bf Handle specifying template args to member function templates.
* tree.c (build_overload): Always create an OVERLOAD for a template.
	* search.c (add_conversions): Handle finding an OVERLOAD.
	* decl2.c (check_classfn): Likewise.
	* lex.c (identifier_type): See through a baselink.
	* parse.y (do_id): Don't call do_identifier if we got a baselink.
	* class.c (instantiate_type, case TREE_LIST): Recurse.
	* decl.c (grokdeclarator): Allow a boolean constant for array
	bounds, odd as that sounds.
	* pt.c (unify): Be more strict about non-type parms, except for
	array bounds.
	(UNIFY_ALLOW_INTEGER): New macro.

From-SVN: r23740
1998-11-21 00:42:20 -05:00
Mark Mitchell
94e098d112 cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
* cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
	(global_delete_fndecl): New variable.
	* decl.c (global_delete_fndecl): Define it.
	(init_decl_processing): Set it.
	* init.c (build_builtin_delete_call): Use it.
	* tree.c (mapcar): Recursively call mapcar for the type of EXPR
	nodes.

From-SVN: r23699
1998-11-18 17:58:33 +00:00
Jason Merrill
59e76fc6ba decl.c (cplus_expand_expr_stmt): Always complain about unresolved type.
* decl.c (cplus_expand_expr_stmt): Always complain about unresolved
	type.
Fixes Sec13/4/E13417.C
	* tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
	* call.c (build_object_call): Also support references to functions.
	* typeck.c (convert_for_initialization): Don't decay a function
	if the target is a reference to function.
Fixes Sec13/2_1_1_2/P13120.C
	* search.c (add_conversions): Get all the overloads from a class.
Fixes Sec13/2/P13101.C
	* decl.c (grok_ctor_properties): Complain about any constructor
	that will take a single arg of the class type by value.
Fixes Sec12/8/S12072.C
	* typeck2.c (build_functional_cast): Can't create objects of
	abstract classes this way.
	* cvt.c (ocp_convert): Likewise.
Fixes Sec10/4/S10018.C
	* decl.c (grokfndecl): Member functions of local classes are not
	public.
Fixes Sec10/3/P10092.C

From-SVN: r23695
1998-11-18 07:27:30 -05:00
Mark Mitchell
7ddedda4aa cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
* cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
	(TYPE_BINFO): Likewise.
	(IS_AGGR_TYPE): Tweak.
	(SET_IS_AGGR_TYPE): New macro.
	(CLASS_TYPE_P): Tweak.
	(lang_type): Group mark bitfields together.  Remove linenum.
	(CLASSTYPE_SOURCE_LINE): Remove macro.
	(CLASSTYPE_MARKED_N): New macro.
	(SET_CLASSTYPE_MARKED_N): Likewise.
	(CLEAR_CLASSTYPE_MARKED_N): Likewise.
	(CLASS_TYPE_MARKED_*): Use them.
	(SET_CLASSTYPE_MARKED_*): Likewise.
	(CLEAR_CLASSTYPE_MARKED_*): Likewise.
	(TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
	(TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
	(TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
	* class.c (class_cache_obstack): New variable.
	(class_cache_firstobj): Likewise.
	(finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
	(pushclass): Free the cache, when appropriate.
	(popclass): Tidy.
	(maybe_push_cache_obstack): Use class_cache_obstack.
	* decl.c (include hash.h).
	(typename_hash): New function.
	(typename_compare): Likewise.
	(build_typename_type): Check the hash table to avoid creating
	duplicates.
	(build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
	(grokdeclarator): Use CLASS_TYPE_P.
	(xref_basetypes): Likewise.
	(start_function): Likewise.  Don't put current_class_ref on the
	permanent obstack.
	* error.c (dump_type_real): Use	TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
	and TYPE_TI_ARGS.
	* lex.c (note_got_semicolon): Use CLASS_TYPE_P.
	(make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
	fields for types other than class types.  Do clear TYPE_ALIAS_SET
	for types other than class types, though.
	* method.c (build_overload_identifier): Use CLASS_TYPE_P and
	TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
	* pt.c (process_template_parm): Don't set
	CLASSTYPE_GOT_SEMICOLON.
	(lookup_template_class) Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
	Coerce arguments on the momentary obstack.
	(for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
	(instantiate_class_template): Calculate template arguments on the
	momentary obstack.  Tidy.
	(tsubst_template_arg_vector): Use make_temp_vec.
	(tsubst_aggr_type): Put template arguments on the momentary
	obstack.
	(tsubst_decl): Likewise.
	(tsubst): Copy the array bounds index to the permanent obstack
	before building index types.  Use new macros.
	(unify): Use new macros.
	(do_type_instantiation): Likewise.
	* search.c (lookup_fnfields_1): Use new macros.
	(dfs_pushdecls): Build envelopes on the cache obstack.
	(dfs_compress_decls): Use new macros.
	(push_class_decls): Build on the cache obstack.
	* semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
	* sign.c (build_signature_pointer_or_reference_type): Use
	SET_IS_AGGR_TYPE.
	* tree.c (make_binfo): Check CLASS_TYPE_P.
	(copy_template_template_parm): Adjust.
	(make_temp_vec): Use push_expresion_obstack.
	* typeck.c (complete_type): Use new macros.
	(comptypes): Likewise.

From-SVN: r23686
1998-11-17 12:51:20 +00:00
Jason Merrill
5524676df8 decl.c (struct cp_function): Add named_label_uses.
* decl.c (struct cp_function): Add named_label_uses.
	(push_cp_function_context): Save it.
	(pop_cp_function_context): Restore it.
	(define_label): Also complain about jumping into the scope of
	non-POD objects that don't have constructors.
	* tree.c (pod_type_p): New fn.
Fixes g++.other/init9.C
	* pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
	* rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
	(get_tinfo_fn): Not here.
	* repo.c (repo_get_id): Abort if we get called for an incomplete
	type.
Fixes g++.pt/instantiate4.C

From-SVN: r23667
1998-11-15 14:24:43 -05:00
Mark Mitchell
3bfdc7190f cp-tree.h (COMPARE_STRICT): New macro.
* cp-tree.h (COMPARE_STRICT): New macro.
	(COMPARE_BASE): Likewise.
	(COMPARE_RELAXED): Likewise.
	(COMPARE_REDECLARATION): Likewise.
	(same_type_p): Likewise.
	(same_or_base_type_p): Likewise.
	* call.c (standard_conversion): Use them, in place of comptypes
	with numeric arguments.
	(reference_binding): Likewise.
	(convert_like): Likewise.
	(build_over_call): Likewise.
	(is_subseq): Likewise.
	(is_properly_derived_from): Likewise.
	(compare_ics): Likewise.
	(joust): Likewise.
	* class.c (delete_duplicate_fields_1): Likewise.
	(resolves_to_fixed_type_p): Likewise.
	(instantiate_type): Likewise.  Remove #if 0'd code.
	* decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
	(pushdecl): Likewise.
	(lookup_name_real): Likewise.
	(grokdeclarator): Likewise.  Check for illegal array declarations.
	(grokparms): Likewise.
	(grok_op_properties): Likewise.
	* decl2.c (check_classfn): Likewise.
	* friend.c (is_friend): Likewise.
	(make_friend_class): Likewise.
	* init.c (expand_aggr_init): Likewise.
	(expand_vec_init): Likewise.
	* pt.c (is_member_template_class): Remove declaration.
	(is_specialization_of): Use COMPARE_* and new macros.
	(comp_template_parms): Likewise.
	(convert_nontype_argument): Likewise.
	(coerce_template_template_parms): Likewise.
	(template_args_equal): Likewise.
	(lookup_template_class): Likewise.
	(type_unification_real): Likewise.
	(unify): Likewise.
	(get_bindings_real): Likewise.
	* search.c (covariant_return_p): Likewise.
	(get_matching_virtual): Likewise.
	* sig.c (match_method_types): Likewise.
	* tree.c (vec_binfo_member): Likewise.
	(cp_tree_equal): Likewise.
	* typeck.c (common_type): Likewise.
	(comp_array_types): Likewise.  Get issues involving unknown array
	bounds right.
	(comptypes): Update comments.  Use new flags.
	(comp_target_types): Use new macros.
	(compparms): Likewise.
	(comp_target_parms): Likewise.
	(string_conv_p): Likewise.
	(build_component_ref): Likewise.
	(build_indirect_ref): Likewise.
	(build_conditional_expr): Likewise.
	(build_static_cast): Likewise.
	(build_reinterpret_cast): Likewise.
	(build_const_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_for_assignment): Likewise.
	(comp_ptr_ttypes_real): Likewise.
	(ptr_reasonably_similar): Likewise.
	(comp_ptr_ttypes_const): Likewise.

From-SVN: r23490
1998-11-01 15:45:11 +00:00
Jason Merrill
b894fc0596 cp-tree.def (TYPEOF_TYPE): New code.
* cp-tree.def (TYPEOF_TYPE): New code.
	* error.c (dump_type_real): Handle it.
	* pt.c (tsubst): Likewise.
	* tree.c (search_tree): Likewise.
	* semantics.c (finish_typeof): New fn.
	* parse.y (typespec): Use it.
	* cp-tree.h: Declare it.

From-SVN: r23343
1998-10-25 21:07:50 -05:00
Mark Mitchell
91063b5138 cplus-dem.c (work_stuff): Replace const_type and volatile_type with type_quals.
* cplus-dem.c (work_stuff): Replace const_type and volatile_type
	with type_quals.
	(TYPE_UNQUALIFIED): New macro.
	(TYPE_QUAL_CONST): Likewise.
	(TYPE_QUAL_VOLATILE): Likewise.
	(TYPE_QUAL_RESTRICT): Likewise.
	(code_for_qualifier): New function.
	(qualifier_string): Likewise.
	(demangle_qualifier): Likewise.
	(internal_cplus_demangle): Use them.
	(demangle_signature): Likewise.
	(demangle_template_value_parm): Likewise.
	(do_type): Likewise.
	(demangle_fund_type)): Likewise.
	* Makefile.in (hash.h): Run gperf when necessary.
	* cp-tree.h (CP_TYPE_READONLY): Remove.
	(CP_TYPE_VOLATILE): Likewise.
	(CP_TYPE_QUALS): New macro.
	(CP_TYPE_CONST_P): Likewise.
	(CP_TYPE_VOLATILE_P): Likewise.
	(CP_TYPE_RESTRICT_P): Likewise.
	(CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
	(cp_build_type_variant): Rename to ...
	(cp_build_qualified_type): New function.
	(c_apply_type_quals_to_decl): Declare.
	(SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
	(SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
	(cp_type_qual_from_rid): New function.
	(compparms): Remove unused parameter.  All callers changed.
	(cp_type_quals): New function.
	(at_least_as_qualified_p): Likewise.
	(more_qualified_p): Likewise.
	* call.c (standard_conversion): Replace calls to
	cp_build_type_variant with cp_build_qualified_type.  Use
	CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
	compare them.  Use CP_TYPE_* macros to check qualifiers.
	(reference_binding): Likewise.
	(implicit_conversion): Likewise.
	(add_builtin_candidates): Likewise.
	(build_over_call): Likewise.
	* class.c (overrides): Compare all qualifiers, not just `const',
	on method declarations.
	* cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
	(convert_pointer_to_real): Likewise.
	(type_promotes_to): Likewise.
	* decl.c (check_for_uninitialized_const_var): New function.
	(init_decl_processing): More CP_TYPE_QUALS conversion, etc.
	(cp_finish_decl): Use check_for_uninitialized_const_var.
	(grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
	handle `restrict'.
	(grok_ctor_properties): Likewise.
	(grok_op_properties): Likewise.
	(start_function): Likewise.
	(rever_static_member_fn): Likewise.
	* decl2.c (grok_method_quals): Likewise.
	(grokfield): Likewise.
	* error.c (dump_readonly_or_volatile): Rename to ...
	(dump_qualifiers): New function.  Handle `restrict'.
	(dump_type_real): Use it.
	(dump_aggr_type): Likewise.
	(dump_type_prefix): Likewise.
	(dump_type_suffix): Likewise.
	(dump_function_decl): Likewise.
	(cv_as_string): Likewise.
	* gxx.gperf: Add __restrict and __restrict__.
	* gxxint.texi: Document `u' as used for `__restrict', and a few
	other previously undocumented codes.
	* hash.h: Regenerated.
	* init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
	(build_member_call): Likewise.
	(build_new_1): Likewise.
	* lex.c (init_parse): Add entry for RID_RESTRICT.
	(cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
	(cp_type_qual_from_rid): Define.
	* lex.h (enum rid): Add RID_RESTRICT.
	* method.c (process_modifiers): Deal with `restrict'.
	* parse.y (primary): More CP_TYPE_QUALS conversion, etc.
	* parse.c: Regenerated.
	* pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
	(tsubst_aggr_type): Likewise.
	(tsubst): Likewise.
	(check_cv_quals_for_unify): Likewise.
	(unify): Likewise.
	* rtti.c (init_rtti_processing): Likewise.
	(build_headof): Likewise.
	(get_tinfo_var): Likewise.
	(buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
	(expand_class_desc): Likewise.
	(expand_attr_desc): Likewise.
	(synthesize_tinfo_fn): Likewise.
	* search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
	(get_matching_virtual): Likewise.
	(expand_upcast_fixups): Likewise.
	* sig.c (build_signature_pointer_or_reference_name): Take
	type_quals, not constp and volatilep.
	(build_signature_pointer_or_reference_type): Likewise.
	(match_method_types): More CP_TYPE_QUALS conversion, etc.
	(build_signature_pointer_constructor): Likewise.
	(build_signature_method_call): Likewise.
	* tree.c (build_cplus_array_type): Likewise.
	(cp_build_type_variant): Rename to ...
	(cp_build_qualified_type): New function.  Deal with `__restrict'.
	(canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
	(build_exception_variant): Likewise.
	(mapcar): Likewise.
	* typeck.c (qualif_type): Likewise.
	(common_type): Likewise.
	(comptypes): Likewise.
	(comp_cv_target_types): Likewise.
	(at_least_as_qualified_p): Define.
	(more_qualified_p): Likewise.
	(comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
	(compparms): Likewise.
	(inline_conversion): Likewise.
	(string_conv_p): Likewise.
	(build_component_ref): Likewise.
	(build_indirect_ref): Likewise.
	(build_array_ref): Likewise.
	(build_unary_op): Likewise.
	(build_conditional_expr): Likewise.
	(build_static_cast): Likewise.
	(build_c_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_For_assignment): Likewise.
	(comp_ptr_ttypes_real): Likewise.
	(cp_type_quals): New function.

From-SVN: r23258
1998-10-23 14:53:28 +00:00
Jason Merrill
0aaa908966 cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
* cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
	(CP_TYPE_VOLATILE): Likewise.
	* decl.c (grokdeclarator): Use them.
	* tree.c (canonical_type_variant): Likewise.

From-SVN: r23244
1998-10-22 22:26:32 -04:00
Jason Merrill
51924768e7 Revamp references to member functions.
* method.c (hack_identifier): Call build_component_ref for a
	reference to a member function.
	* typeck.c (build_component_ref): Only return a single function
	if it's static.  Otherwise, return a COMPONENT_REF.
	(build_x_function_call): Handle a COMPONENT_REF.
	(build_unary_op): Handle all unknown-type things.
	* decl2.c (arg_assoc): Handle COMPONENT_REF.
	* class.c (instantiate_type): Complain if the function we get is a
	nonstatic member function.  Remove code for finding "compatible"
	functions.
	* pt.c (tsubst_copy): Handle NOP_EXPR.
	* tree.c (build_dummy_object): New fn.
	(maybe_dummy_object): New fn.
	(is_dummy_object): New fn.
	* cp-tree.h: Declare them.
	* cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
	* error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
	* init.c (build_member_call): Use maybe_dummy_object and
	is_dummy_object.
	(build_offset_ref): Use maybe_dummy_object.
	(resolve_offset_ref): Use is_dummy_object.
	* typeck.c (build_x_function_call): Call build_dummy_object.
	(unary_complex_lvalue): Call is_dummy_object.
	* typeck.c (build_component_addr): Make sure field is a field.
	* call.c (build_new_op): Delete obsolete code.
	* pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.

From-SVN: r23186
1998-10-19 16:08:23 -04:00
Kaveh R. Ghazi
1ddb2906cc Warning fixes:
* class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
        (add_method): Likewise for arguments 1 & 2 of `bcopy'.
        * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
        * pt.c (process_partial_specialization): Cast 1st argument of
        `bzero' to (PTR).
        * tree.c (build_base_fields): Cast `base_align' to (int) when
        comparing against one.

From-SVN: r23156
1998-10-17 20:33:45 +00:00
Mark Mitchell
61a127b3d1 cp-tree.def (PTRMEM_CST): New tree node.
* cp-tree.def (PTRMEM_CST): New tree node.
	* cp-tree.h (ptrmem_cst): New type.
	(lang_type): Remove local_typedecls.
	(dummy): Increase to 12 bits from 11.
	(CLASSTYPE_LOCAL_TYPEDECLS): Remove.
	(PTRMEM_CST_CLASS): New macro.
	(PTRMEM_CST_MEMBER): Likewise.
	(current_access_specifier): New variable.
	(current_class_type): Remove duplicate declaration.
	(finish_struct): Change prototype.
	(unreverse_member_declarations): New function.
	(pushdecl_class_level): Change prototype.
	(grok_enum_decls): Remove.
	(fixup_anonymous_union): New function.
	(grok_x_components): Change prototype.
	(tsubst_chain): Remove.
	(finish_member_template_decl): Likewise.
	(check_explicit_specialization): Fix indentation.
	(finish_class_definition): Change prototype.
	(finish_member_class_template): Likewise.
	(finish_member_declaration): New function.
	(check_multiple_declarators): Likewise.
	* class.c (class_stack_node_t): New type.
	(current_class_base): Remove.
	(current_class_stack): Change type.
	(current_access_specifier): New variable.
	(grow_method): Remove.
	(check_member_decl_is_same_in_complete_scope): Break out from
	finish_struct.
	(make_method_vec): New function.
	(free_method_vec): Likewise.
	(add_implicitly_declared_members): Break out from finish_struct_1.
	(free_method_vecs): New variable.
	(add_method): Rework for direct use from parser.
	(handle_using_decl): Watch for NULL_TREE while iterating through
	CLASSTYPE_METHOD_VEC.
	(finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
	just do some error-checking.
	(warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
	(finish_struct_1): Simplify.  Use add_implicitly_declared_members.
	(finish_struct): Change prototype.  Simplify; fields and methods
	are already set up at this point.
	(init_class_processing): Set up current_class_stack.
	(pushclass): Save current_access_specifier.
	(popclass): Restore it.
	(currently_open_class): Simplify.
	(build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
	* decl.c (saved_scope): Add access_specifier.
	(maybe_push_to_top_level): Save it.
	(pop_from_top_level): Restore it.
	(maybe_process_template_type_declaration): Use
	finish_member_declaration.
	(pushtag): Likewise.
	(pushdecl_class_level): Don't return a value.
	(fixup_anonymous_union): Break out from grok_x_components.
	(shadow_tag): Use it.
	(xref_tag): Complain about using an elaborated type specifier to
	reference a template type parameter or typedef name.
	(xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
	(current_local_enum): Remove.
	(build_enumerator): Call finish_member_declaration.
	(grok_enum_decls): Remove.
	* decl2.c (grok_x_components): Simplify.
	(check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
	(grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
	(merge_functions): Add to comment.
	(arg_assoc_type): Prototype.
	(arg_assoc): Pass as many arguments as there are parameters.
	* error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
	OFFSET_REF.
	* expr.c (cpls_expand_expr): Remove dead code.  Handle
	PTRMEM_CST.
	* friend.c (do_friend): Lookup friends when in nested classes.
	Change comments.
	* init.c (build_offset_ref): Do lookup even for classes that are
	only partially defined.
	(decl_constant_value): Remove dead code.
	* method.c (build_overload_value): Remove hack where by TYPE was
	not a TYPE.  Handle PTRMEM_CST.
	(build_template_parm_names): Don't pass a PARM_DECL where a TYPE
	should go.
	* parse.y (components, notype_components, component_decl,
	component_decl_1, component_declarator, component_declarator0):
	Now all are itype rather than ttype.  Rework to add members to
	classes on the fly.
	(typesqpecqual_reserved): Use check_multiple_declarators.
	(structsp): Update class to finish_class_definition.
	(do_xref_defn): Unsplit into named_class_head.
	(access_specifier): Set current_access_specifier.
	* pt.c (set_current_access_from_decl): New function.
	(finish_member_template_decl): Don't take the parameters.
	(comp_template_args): Make more robust.
	(lookup_template_class): Don't use current_local_enum.
	(for_each_template_parm): Handle PTRMEM_CST.
	(instantiate_class_template): Use set_current_access_from_decl,
	finish_member_declaration and unreverse_member_declarations.  Set
	lineno/input_filename before generating implicit member functions.
	(type_unification_real): Don't assume back-unification happens
	only for the last argument.
	(regenerate_decl_from_template): Call pushclass a bit earlier.
	(tsubst_chain): Remove.
	(tsubst_enum): Use set_current_access_from_decl.
	(set_mangled_name_for_template_decl): Fix indentation.
	* search.c (lookup_fnfields_1): Change iteration through
	CLASSTYPE_METHOD_VEC.
	(dfs_pushdecls): Likewise.
	(dfs_compress_decls): Likewise.
	(add_conversions): Likewise.
	* semantics.c (finish_class_definition): Don't take components.
	Change call to finish_struct.
	(finish_member_declaration): New function.
	(finish_member_class_template): Don't take template parameters.
	Change call to grok_x_components.  Call finish_member_template_decl.
	(check_multiple_declarators): New function.
	* sig.c (append_signature_fields): Work from the TYPE_METHODS, not
	a passed in fieldlist.
	* tree.c (search_tree): Handle PTRMEM_CST.
	(mapcar): Likewise.
	* typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
	INTEGER_CSTs, for pointer-to-data members.

From-SVN: r22869
1998-10-06 14:20:30 +00:00
Jason Merrill
14ae7e7d28 decl.c (grokdeclarator): Remove redundant calls to build_type_variant and some duplicated code.
* decl.c (grokdeclarator): Remove redundant calls to
	build_type_variant and some duplicated code.
	* sig.c (build_signature_reference_type): Only take the type parm.
	(build_signature_pointer_type): Likewise.
	* tree.c (build_cplus_method_type): Adjust.
	* cp-tree.h: Update.

From-SVN: r22820
1998-10-04 12:20:59 -04:00
Mark Mitchell
01240200ee class.c (current_class_ptr, [...]): Clarify documentation.
* class.c (current_class_ptr, current_class_ref): Clarify
	documentation.
	* cvt.c (ocp_convert): Don't expect fold to remove all trivial
	NOP type conversions.
	* decl.c (decls_match): Use comptypes directly; ignore
	qualifiers on the DECL.
	(duplicate_decls): Remove qualifier checks on DECL.
	(grokdeclarator): Make the type built up include top-level
	qualifiers.
	* decl2.c (do_dtors): Fix spelling error.
	* error.c (dump_simple_decl): Don't look at qualifiers on the decl
	when printing type information.
	* init.c (build_new_1): Add documentation.  Deal with the fact
	that type of allocated memory now contains qualifiers.
	* lex.c (is_global): Improve error-recovery.
	* sig.c (build_member_function_pointer): Don't cast away const
	on fields of sigtable_entry_type.
	* tree.c (lvalue_type): Don't look at top-level qualifiers on
	expressions.
	* typeck.c (decay_conversion): Likewise.
	(build_component_ref): Make sure the type of the COMPONENT_REF
	contains top-level qualifiers, as appropriate.  Improve
	error-handling.
	(build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
	(build_array_ref): Likewise.
	(build_unary_op): Improve error-recovery.
	(unary_complex_lvalue): Make taking the address a bound member
	function an error, not a sorry.
	(build_conditional_expr): Look at the type qualifiers, not the
	qualifiers on the expression itself.

From-SVN: r22802
1998-10-03 23:11:19 +00:00
Jason Merrill
38f01e5a57 cp-tree.h (FORMAT_VBASE_NAME): New macro.
* cp-tree.h (FORMAT_VBASE_NAME): New macro.
	* class.c (build_vbase_pointer): Use it.
	* rtti.c (expand_class_desc): Likewise.
	* tree.c (build_vbase_pointer_fields): Likewise.

From-SVN: r22713
1998-10-01 08:31:22 -04:00
Mark Mitchell
69851283e8 cp-tree.h (language_lvalue_valid): Remove.
* cp-tree.h (language_lvalue_valid): Remove.
	* decl.c (grokdeclarator): Don't disallow references to functions.
	* tree.c (lvalue_p_1): New function, combining duplicated
	code from ...
	(lvalue_p): Use it.
	(real_lvalue_p): Likewise.
	* typeck.c (language_lvalue_valid): Remove.
	(build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
	they don't have TREE_READONLY set.
	* typeck2.c (readonly_error): Add case for FUNCTION_DECLs.

From-SVN: r22583
1998-09-24 23:53:37 +00:00
Jason Merrill
8251199e44 revert error reporting patch
From-SVN: r22310
1998-09-07 10:25:35 -04:00
Mark Mitchell
d41fbd2cb8 cp-error.def: New file.
* cp-error.def: New file.
	* Make-lang.in (cc1plus): Add dependency on it.
	* Makefile.in (CXX_TREE_H): Likewise.
	* cp-tree.h (error_code): New type.
	Include cp-error.def to get error codes.  Make it possible to
	include cp-tree.h in errfn.c.
	(enable_warning): New function.
	(flag_diag_codes): New variable.
	* errfn.c: Include cp-tree.h.
	(cp_err_msg): New type.  Include cp-error.def to define it.
	(err_msgs): New variable.
	(is_warning_enabled): New function.
	(cp_thing): Take an error_code, not a format string.  Output the
	diagnostic code if flag_diag_codes.
	(cp_error, cp_compiler_error, cp_sprintf, cp_error_at): Take
	error_codes, not format strings.
	(cp_warning, cp_pedwarn, cp_warning_at, cp_pedwarn_at): Likewise.
	Call is_warning_enabled.
	* decl2.c (flag_diag_codes): New variable.
	(lang_decode_option): Handle -fdiag-codes and -Wnumber.
	* lang-options.h: Add -fdiag-codes, -fno-diag-codes, and
	-W-number-, and -Wno-number.
	* class.c: Update all calls to error-functions.
	* cvt.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* friend.c: Likewise.
	* lex.c: Likewise.
	* parse.y: Likewise.
	* pt.c: Likewise.
	* repo.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* sig.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.
	* xref.c: Likewise.

From-SVN: r22304
1998-09-06 19:45:16 +00:00
Jason Merrill
dfbcd65a01 Never change BINFO_INHERITANCE_CHAIN.
* init.c (emit_base_init): Change modification of
	BINFO_INHERITANCE_CHAIN to an assert.
	* search.c (get_base_distance_recursive): Likewise.
	(get_base_distance): Likewise.
	(lookup_member): Likewise.
	(convert_pointer_to_single_level): Likewise.
	(lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
	(lookup_fnfields): Likewise.
	* tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
	(unshare_base_binfos): Don't call propagate_binfo_offsets.
	(layout_basetypes): Call propagate_binfo_offsets instead of
	unshare_base_binfos.
	* decl.c (xref_basetypes): Call unshare_base_binfos.
	* pt.c (instantiate_class_template): Likewise.
	* tree.c (reverse_path): Remove 'copy' parm; always make a
	temporary copy.
	* class.c (build_vbase_path): Just call it.
	* search.c (compute_access): Likewise.  Don't re-reverse.

From-SVN: r22024
1998-08-27 11:30:49 -04:00
Mark Mitchell
ca107dedc7 class.c (build_vbase_path): Use reverse_path.
* class.c (build_vbase_path): Use reverse_path.
	(finish_base_struct): Move warnings for inaccessible bases to
	layout_basetypes.
	(modify_one_vtable): Remove check of TREE_USED (binfo).
	(fixup_vtable_deltas1): Likewise.
	* cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
	(xref_tag): Remove binfos parameter.
	(make_binfo): Remove chain parameter.
	(reverse_path): Add copy parameter.
	* decl.c (init_decl_processing): Change calls to xref_tag.
	(xref_tag): Remove binfos parameter.
	(xref_basetypes): Change calls to make_binfo.
	* decl2.c (grok_x_components): Change calls to xref_tag.
	(handle_class_head): Likewise.
	* friend.c (do_friend): Likewise.
	* lex.c (make_lang_type): Change calls to make_binfo.
	* parse.y (structsp): Change calls to xref_tag.
	(named_complex_class_head_sans_basetype): Likewise.
	(named_class_head): Likewise.
	* rtti.c (init_rtti_processing): Likewise.
	* search.c (compute_access): Change calls to reverse_path.
	(dfs_get_vbase_types): Change calls to make_binfo.
	(get_vbase_types): Remove dead code.
	* tree.c (unshare_base_binfos): Change calls to make_binfo.
	(layout_basetypes): Warn here about inaccessible bases.
	(make_binfo): Remove chain parameter.
	(reverse_path): Add copy parameter.

From-SVN: r22021
1998-08-27 10:17:48 +00:00
Jason Merrill
0ec5701756 Stop sharing binfos for indirect virtual bases.
* tree.c (propagate_binfo_offsets): Unshare vbases, too.
	(layout_basetypes): Likewise.
	(unshare_base_binfos): Copy vbases, too.
	* cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
	BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
	(BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
	CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
	* search.c (lookup_field, lookup_fnfields, lookup_member): Remove
	reference to BINFO_VIA_PUBLIC.
	(marked_pushdecls_p, unmarked_pushdecls_p): New fns.
	(push_class_decls): Use them.
	(dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
	(dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.

From-SVN: r22017
1998-08-26 21:41:17 -04:00
Kaveh R. Ghazi
789f983ab1 system.h: Include stdarg.h/varargs.h...
* system.h: Include stdarg.h/varargs.h, make sure they are ordered
        correctly with regards to stdio.h.
        * calls.c: Remove stdarg.h/varargs.h.
        * cccp.c: Likewise.
        * cexp.y: Likewise.
        * combine.c: Likewise.
        * cpperror.c: Likewise.
        * cpplib.c: Likewise.
        * cpplib.h: Likewise.
        * doprint.c: Likewise.
        * emit-rtl.c: Likewise.
        * final.c: Likewise.
        * fix-header.c: Likewise.
        * gcc.c: Likewise.
        * genattr.c: Likewise.
        * genattrtab.c: Likewise.
        * gencodes.c: Likewise.
        * genconfig.c: Likewise.
        * genemit.c: Likewise.
        * genextract.c: Likewise.
        * genflags.c: Likewise.
        * genopinit.c: Likewise.
        * genoutput.c: Likewise.
        * genpeep.c: Likewise.
        * genrecog.c: Likewise.
        * mips-tfile.c: Likewise.
        * prefix.c: Likewise.
        * protoize.c: Likewise.
        * regmove.c: Likewise.
        * toplev.c: Likewise.
        * tree.c: Likewise.
        * cp/errfn.c: Remove stdarg.h/varargs.h.
        * cp/tree.c: Likewise.

From-SVN: r21997
1998-08-26 08:11:47 +00:00
Jason Merrill
acb619d997 oops
From-SVN: r21888
1998-08-20 19:35:23 -04:00
Jason Merrill
50a6dbd707 tree.c (search_tree, [...]): New fn.
* tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
	* pt.c (coerce_template_parms): Use no_linkage_check.
	* decl.c (grokvardecl): Likewise.
	(grokfndecl): Likewise.  Members of anonymous types have no linkage.
	* method.c (process_overload_item): Remove useless code.

From-SVN: r21884
1998-08-20 13:41:43 -04:00
Jason Merrill
d12e8f597a tweak
From-SVN: r21797
1998-08-17 13:25:32 -04:00
Jason Merrill
8cd4c17528 gxxint.texi: Remove obsolete documentation of overloading code.
* gxxint.texi: Remove obsolete documentation of overloading code.
	* decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
	* tree.c (lvalue_type): Fix for arrays.
	* typeck.c (build_unary_op): Use lvalue_type.
	* call.c (add_function_candidate): Likewise.
	* cvt.c (convert_to_reference): Likewise.
	* decl2.c (lang_decode_option): Ignore -traditional.

From-SVN: r21795
1998-08-17 13:13:42 -04:00
Mark Mitchell
672476cbdf cp-tree.def (LOOKUP_EXPR): Document.
* cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
	* cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
	* lex.c (do_identifier): Don't use a second argument, or a type,
	when building LOOKUP_EXPRs.
	(do_identifier): Likewise.
	(do_scoped_id): Likewise.
	* method.c (hack_identifier): Improve error message.
	* pt.c (lookup_template_function): Don't needlessly call
	copy_to_permanent or build_min.
	(tsubst_copy): Remove #if 0'd code.  Tsubst into LOOKUP_EXPRs if
	necessary.
	(do_decl_instantiation): Improve error message.
	* tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
	(build_min): Copy the type to the permanent obstack, too.

From-SVN: r21544
1998-08-02 21:37:23 +00:00
Jason Merrill
92ac31f12b parse.y (direct_notype_declarator): Add precedence declaration to notype_unqualified_id case.
* parse.y (direct_notype_declarator): Add precedence declaration
	to notype_unqualified_id case.
	* tree.c (ovl_member): Fix for single function in OVL.

From-SVN: r21417
1998-07-27 10:38:11 -04:00
Jason Merrill
53929c47c5 tree.c (canonical_type_variant): New fn to handle arrays.
* tree.c (canonical_type_variant): New fn to handle arrays.
	* cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
	* pt.c (unify, default case): Also fold arg.  Fix array bounds case.
	* method.c (process_overload_item): Use build_overload_value for
	arrays.

From-SVN: r21324
1998-07-21 14:16:09 -04:00
Jason Merrill
c5a6fc4557 pt.c (tsubst, [...]): Fix getting complete args for a member template specialization.
* pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
	a member template specialization.
	* tree.c (ovl_member): Use decls_match to compare functions.
	* decl.c (decls_match): Check the context of a function.

From-SVN: r21248
1998-07-17 02:19:07 -04:00
Jason Merrill
6c011b01ce decl.c (lookup_tag): Use CP_DECL_CONTEXT.
* decl.c (lookup_tag): Use CP_DECL_CONTEXT.
	* tree.c (make_binfo): Fix length.

From-SVN: r20954
1998-07-06 14:24:46 -04:00
Brendan Kehoe
37e58443ad revert part of the last checkin
From-SVN: r20794
1998-06-29 09:41:20 -04:00
Brendan Kehoe
a48ebb5650 tree.c (build_srcloc): Make sure we allocate this node on the permanent obstack.
* tree.c (build_srcloc): Make sure we allocate this node on the
	permanent obstack.
fixes OSE compilation failures

From-SVN: r20793
1998-06-29 09:39:23 -04:00
John Carr
71e89f27cd tree.c (debug_binfo): Make printf format match arguments.
1998-06-10  John Carr  <jfc@mit.edu>
	* tree.c (debug_binfo): Make printf format match arguments.
	* error.c (OB_PUTI): Make printf format match arguments.

From-SVN: r20401
1998-06-10 05:54:23 +00:00
Jason Merrill
db36eaf7d0 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
From-SVN: r20227
1998-06-04 07:45:17 -04:00
Jason Merrill
285baa062b error.c (dump_expr): Clean up NEW_EXPR case.
* error.c (dump_expr): Clean up NEW_EXPR case.
	* tree.c (mapcar): Support NEW_EXPR.
	* error.c (dump_expr): Support NEW_EXPR.
	* decl2.c (arg_assoc_type): Return 0 for LANG_TYPE.

From-SVN: r20218
1998-06-03 21:33:03 -04:00
Jason Merrill
8a70cb5e65 tree.c (build_cplus_array_type_1): Also check index_type for template parms.
* tree.c (build_cplus_array_type_1): Also check index_type for
	template parms.

From-SVN: r20164
1998-05-31 22:04:10 -04:00
Scott Snyder
25868f6cad tree.c (layout_basetypes): If we change TYPE_SIZE, change TYPE_SIZE_UNIT too.
* tree.c (layout_basetypes): If we change TYPE_SIZE, change
	TYPE_SIZE_UNIT too.

From-SVN: r20142
1998-05-29 19:17:23 -04:00
Mark Mitchell
7dd4bdf55d tree.c (cp_tree_equal): Handle pointers to member functions.
1998-05-24  Mark Mitchell  <mark@markmitchell.com>
	* tree.c (cp_tree_equal): Handle pointers to member functions.

From-SVN: r20038
1998-05-24 23:57:48 +00:00
Jason Merrill
1139b3d870 cp-tree.def: Add SRCLOC.
* cp-tree.def: Add SRCLOC.
	* cp-tree.h: Add struct tree_srcloc and accessor macros.
	* tree.c (build_srcloc, build_srcloc_here): New fns.
	* pt.c (add_pending_template): Use build_srcloc_here.
	(push_tinst_level): Update last_template_error_tick before erroring.
	(instantiate_decl): Restore lineno and input_filename before
	calling add_pending_template.
	* decl2.c (finish_file): Set up lineno and input_filename for
	pending templates.

From-SVN: r19967
1998-05-22 22:18:33 -04:00
Jason Merrill
b8887b6323 tree.c (is_overloaded_fn): Don't abort on placeholders from push_class_decls.
* tree.c (is_overloaded_fn): Don't abort on placeholders from
	push_class_decls.

From-SVN: r19888
1998-05-19 16:38:04 -04:00
Kaveh R. Ghazi
77dc0938f7 Warning fixes:
* Makefile.in (parse.o): Depend on toplev.h.
        * class.c (typecode_p): Remove prototype and definition.
        * cp-tree.h (currently_open_class, is_empty_class, member_p):
        Add prototype.
        * decl.c (push_overloaded_decl_top_level): Remove prototype and
        definition.
        * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
        in call to `cp_thing'.
        (cp_warning): Likewise for function pointer `warning'.
        * except.c (do_function_call): Remove prototype and definition.
        (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
        * method.c (is_java_type): Add prototype and make it static.
        * parse.y: Include toplev.h.
        * pt.c (type_unification): Remove unused variable `arg'.
        (instantiate_decl): likewise for `save_ti'.
        * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.

From-SVN: r19866
1998-05-19 07:19:17 +00:00
Jason Merrill
42c7b8075d class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
* class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
	* decl2.c (constructor_name_full): Likewise.
	* tree.c (mapcar): Add OVERLOAD support.
	* init.c (resolve_offset_ref): We must use basetype_path before we
	destroy it with a call to convert_pointer_to.

From-SVN: r19656
1998-05-10 18:53:45 -04:00
Martin v. Löwis
2c73f9f57a massive namespace patch
From-SVN: r19631
1998-05-07 22:06:26 -04:00
Jeff Law
38e012594e typo typo fixes fixes
From-SVN: r19601
1998-05-06 15:09:07 -06:00
Robert Lipe
12027a8912 call.c, [...]: Add include of toplev.h.
Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
        * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
        expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
        search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
        xref.c: Add include of toplev.h.

From-SVN: r19567
1998-05-06 05:05:11 +00:00
Jason Merrill
73c9f27018 tree.c (perm_manip): Also regenerate the RTL of an extern.
* tree.c (perm_manip): Also regenerate the RTL of an extern.
	(copy_to_permanent): Use end_temporary_allocation.

From-SVN: r19560
1998-05-05 22:40:36 -04:00
Jason Merrill
5ffe581dd3 cp-tree.def: Add WRAPPER.
* cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
	* cp-tree.h: Add WRAPPER support.
	* call.c (add_candidate): Split out from add_*_candidate fns.
	(build_over_call): Take the candidate instead of function and args.
	Enforce access control here.  Emit overload warnings here.
	(add_warning): New fn.
	(joust): Add WARN parm.  If not set, call add_warning instead of
	printing a warning.  Reenable some warnings.
	(tourney): Pass it.
	(convert_like): Adjust.
	(build_new_op): Adjust.
	(build_new_function_call): Adjust.
	(build_user_type_conversion_1): Adjust.
	(USER_CONV_FN): Adjust.
	* tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
	build_int_wrapper): New fns.

From-SVN: r19393
1998-04-23 18:26:41 -04:00
Jeffrey A Law
69ac77ce5e tree.c (avoid_overlap): Add prototype.
* tree.c (avoid_overlap): Add prototype.
        * spew.c (num_tokens): Add prototype.
        (nth_noken, add_token, consume_token, debug_yychar): Likewise.
        * search.c (dfs_check_overlap): Add prototype.
        (dfs_no_overlap_yet): Likewise.
        * pt.c (original_template): Add prototype.
        (inline_needs_template_parms): Likewise.
        (push_inline_template_parms_recursive): Likewise.
        (retrieve_specialization, register_specialization): Likewise.
        (print_candidates, reduce_template_parm_level): Likewise.
        (build_template_decl, mark_template_parm): Likewise.
        (tsubst_friend_function, get_bindings_real): Likewise.
        * method.c (start_squangling): Add prototype.
        (end_squangling, check_ktype, issue_ktype): Likewise.
        (build_overloaded_scope_ref, check_btype): Likewise.
        (build_mangled_template_parm_index): Likewise.
        * lex.c (init_cpp_parse): Add prototype.
        (handle_cp_pragma, handle_sysv_pragma): Likewise.
        (reduce_cmp, token_cmp): Likewise.
        * except.c (call_eh_info): Add prototype.
        (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
        (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
        * decl2.c (is_namespace_ancestor): Add prototype.
        (namespace_ancestor, add_using_namespace): Likewise.
        (ambiguous_decl): Likewise.
        * decl.c (indent): Add prototype.
        * call.c (add_template_candidate_real): Add prototype.

From-SVN: r19259
1998-04-17 02:05:26 -06:00
Jason Merrill
80cd3ecac8 * tree.c (avoid_overlap): Return a value.
From-SVN: r19004
1998-04-04 22:24:25 -05:00
Jason Merrill
732dcb6f2a Implement empty base optimization.
* class.c (finish_struct_1): Add vbase fields earlier.  Set
	CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
	* search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
	(types_overlap_p): New fn.
	* tree.c (avoid_overlap): New fn.
	(build_base_fields): Use it to avoid overlapping empty bases.
	* cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.

From-SVN: r18978
1998-04-03 09:13:24 -05:00
Jason Merrill
9a71c18b28 Re-implement allocation of base class subobjects.
* tree.c (unshare_base_binfos): New fn.
	(layout_basetypes): Use it.  Now handles offsets of both virtual and
	non-virtual bases, after layout_type.
	(layout_vbasetypes): Remove.
	(build_base_fields): Generate FIELD_DECLs for each non-virtual base.
	(build_vbase_pointer_fields): Split out from old layout_basetypes.
	* class.c (finish_base_struct): Lose offset handling code.
	Move nonvdtor warning here.  Don't mess with t_binfo anymore.
	(finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
	* cp-tree.h: Adjust.

From-SVN: r18973
1998-04-02 22:41:20 -05:00
Jason Merrill
0b41abe668 cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
* cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
	* decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
	* class.c (duplicate_tag_error): Likewise.
	(finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
	* tree.c (layout_vbasetypes): Update from layout_record, remove
	var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
	(layout_basetypes): Likewise.

From-SVN: r18965
1998-04-02 12:05:40 -05:00
Jeffrey A Law
8d052bc70c call.c: Include system.h.
* call.c: Include system.h.  Remove includes, declarations and
        defines provided by system.h.
        * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
        * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
        * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
        * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
        * typeck2.c, xref.c: Likewise.
        * Makefile.in: Dependencies updated as appropriate.
        * Make-lang.in: Likewise.
system.h cutover from the cp subdir

From-SVN: r18917
1998-03-31 06:25:46 -07:00
Jason Merrill
f94ae2f5c0 tree.c (member_p): New fn.
* tree.c (member_p): New fn.
	* decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
	initializing class members.
	* cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
	* ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.

From-SVN: r18909
1998-03-30 05:56:25 -05:00
Mark Mitchell
ae16ec5f2c tree.c (mapcar): When dealing with a DECL, use it's constant value, if any.
�
	* tree.c (mapcar): When dealing with a DECL, use it's constant
	value, if any.
	* pt.c (lookup_template_class): Don't mangle the names of template
	classes whose arguments are unknown.
	* pt.c (tsubst_expr): Handle GOTO_STMT correctly.

From-SVN: r18803
1998-03-24 16:13:09 +00:00
Manfred Hollstein
4e1e206433 a
In gcc/:
	* bitmap.c (bitmap_element_allocate): Remove unused parameter;
	change callers accordingly.
	* cplus-dem.c (arm_special): Remove unused parameter work in prototype
	and definition; change all callers accordingly.
	* except.c (init_eh): Avoid assignment of unused return value of
	build_pointer_type; cast it to void, instead, and remove unused
	variable type.
	* gcc.c (lang_specific_driver): Define prototype only #ifdef
	LANG_SPECIFIC_DRIVER.
	(temp_names): Define only #ifdef MKTEMP_EACH_FILE.
	* genoutput.c (output_epilogue): Initialize next_name to 0.
	* real.c (efrexp): #if 0 prototype and function definition.
	(eremain): Likewise.
	(uditoe): Likewise.
	(ditoe): Likewise.
	(etoudi): Likewise.
	(etodi): Likewise.
	(esqrt): Likewise.
	* reload.c (push_secondary_reload): Define prototype only
	#ifdef HAVE_SECONDARY_RELOADS.
	* varasm.c (assemble_static_space): Define rounded only
	#ifndef ASM_OUTPUT_ALIGNED_LOCAL.
In gcc/cp/:
	* call.c (default_parm_conversions): Remove prototype definition.
	(build_method_call): Remove unused variable result.
	* cvt.c (ocp_convert): Remove unused variable conversion.
	* decl2.c (ambiguous_decl): Add explicit parameter definition for name.
	* except.c (do_unwind): #if 0 definition of unused variables fcall
	and next_pc.
	* expr.c (extract_scalar_init): #if 0 prototype and function definition.
	* init.c (expand_aggr_init_1): Remove unused variable init_type.
	(build_new_1): Remove unused variable t.
	* pt.c (instantiate_class_template): Remove unused variable newtag;
	cast called function return value to void.
	(do_decl_instantiation): Remove unused variables name and fn.
	* tree.c (get_type_decl): Add default return to shut up compiler from
	complaining control reaches end of non-void function.
	* typeck.c (build_x_conditional_expr): Remove unused variable rval.

From-SVN: r18497
1998-03-12 00:29:16 +00:00
Manfred Hollstein
f8344bea51 c-decl (finish_struct): Change type of min_align to unsigned.
a
gcc/ChangeLog:
	* c-decl (finish_struct): Change type of min_align to unsigned.
	* cplus-dem.c (demangle_function_name): Change type of variable i to size_t;
	remove unused variable len.
	* dwarf2out.c (reg_save): Add explicit cast of -1 to unsigned and a
	comment indicating this is proper behaviour.
	(reg_loc_descriptor): Remove redundant comparison of unsigned variable
	reg >= 0.
	(based_loc_descr): Likewise.
	* enquire.c (bitpattern): Change type of variable i to unsigned.
	* final.c (output_asm_insn): Don't cast insn_noperands to unsigned.
	* flow.c (life_analysis): Change type of variable i to size_t;
	remove unused variable insn.
	* gcc.c (translate_options): Change type of variables optlen, arglen and
	complen to size_t.
	(input_filename_length): Change type to size_t.
	(do_spec_1): Change type of variable bufsize to size_t.
	(main): Change type of variables i and j to size_t;
 	remove subblock local definition of variable i.
	(lookup_compiler): Change type of second argument to size_t;
	change type of variable i to size_t.
	* genemit.c (output_init_mov_optab): Change type of variable i to size_t.
	* genopinit.c (get_insn): Change type of variable pindex to size_t.
	* genrecog.c (add_to_sequence): Change type of variable i to size_t.
	* global.c (global_alloc): Change type of variable i to size_t.
	* regclass.c (init_reg_sets): Change type of variables i and j to unsigned.
	* stmt.c (expand_end_bindings): Change type of variable i to size_t.
	(expand_end_case): Change type of variable count to size_t.
	* toplev.c (main): Change type of variable j to size_t.
	(set_target_switch): Change type of variable j to size_t.
	(print_switch_values): Change type of variable j to size_t;
	remove unused variable flags.
	* varasm.c (assemble_variable): Change type of variable align to size_t.
	(const_hash_rtx): Change type of variable i to size_t.
gcc/cp/ChangeLog:
Sun Mar  8 17:13:38 1998  Manfred Hollstein  <manfred@s-direktnet.de>
	* decl2.c (lang_decode_option): Change j's type to size_t.
	* tree.c (layout_vbasetypes): record_align and desired_align are of
	type unsigned int; const_size and nonvirtual_const_size likewise.

From-SVN: r18491
1998-03-12 00:02:52 +00:00
Jason Merrill
f84b4be9a7 Support for friend templates.
* typeck.c (build_x_function_call): Handle static member function
	templates like non-templates.  Handle friend templates like normal
	function templates.
	* pt.c (tsubst, *_PARM): Don't use orig_level.
	(get_bindings): Don't call add_to_template_args.
	(instantiate_template): Likewise.
	(tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
	* ptree.c (print_lang_type): Print index/level for template parms.
	* Make-lang.in (cc1plus): Note that cc1plus depends on
	cp/cp-tree.h and cp/cp-tree.def.
	* cp-tree.def (TEMPLATE_CONST_PARM): Remove.
	(TEMPLATE_PARM_INDEX): New tree code, used to indicate a
	position in a template parameter list.
	* cp-tree.h (template_parm_index): New structure, used as the tree
	structure for a TEMPLATE_PARM_INDEX.
	(TEMPLATE_PARM_IDX): New macro.
	(TEMPLATE_PARM_LEVEL): Likewise.
	(TEMPLATE_PARM_DESCENDANTS): Likewise.
	(TEMPLATE_PARM_ORIG_LEVEL): Likewise.
	(TEMPLATE_PARM_DECL): Likewise.
	(TEMPLATE_TYPE_PARM_INDEX): Likewise.
	(TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
	(TEMPLATE_TYPE_DECL): Likewise.
	(TEMPLATE_CONST_IDX): Remove.
	(TEMPLATE_CONST_LEVEL): Likewise.
	(TEMPLATE_CONST_SET_INFO): Likewise.
	(TEMPLATE_TYPE_SET_INFO): Likewise.
	(TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
	node.
	(TEMPLATE_TYPE_LEVEL): Likewise.
	* decl.c (decls_match): Call comp_template_parms, rather than
	expanding it inline.
	(duplicate_decls): If two template declarations are being merged,
	then their TEMPLATE_INFOs should be merged as well.
	(grokfndecl): Save template-id information when declaring a friend
	with explicit template arguments.  Pass arguments to
	check_explicit_specialization via correct convention; at some
	point check_explicit_specialization changed, but these call-sites
	did not.
	(grokdeclarator): Tidy up slightly.
	* decl2.c (check_classfn): Tidy up slightly.  Don't assume that
	two template functions with the same DECL_ASSEMBLER_NAME the same,
	since the names are not yet mangled.
	* error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
	TEMPLATE_CONST_PARM.
	(dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
	decl for a non-type parameter, rather than printing `<tparm ...>'.
	* friend.c (is_friend): Handle TEMPLATE_DECL friends.
	(do_friend): Deal with template friends.
	* lex.c (do_pending_inlines): Call
	maybe_begin_member_template_processing, rather than
	conditionally calling begin_member_template_processing.
	(process_next_inline): Likewise.  Call
	maybe_end_member_template_processing, rather than
	conditionally calling end_member_template_processing.
	(do_pending_defargs): Likewise.
	(do_identifier): Use TEMPLATE_PARM_INDEX instead of
	TEMPLATE_CONST_PARM.
	* method.c (build_mangled_template_parm_index): New function.
	(build_overload_value): Use it.
	(build_overload_name): Likewise.
	* pt.c (finish_member_template_decl): Allow friend declarations.
	(template_class_depth): New function.
	(is_member_template): Rename, and modify, to become...
	(is_member_or_friend_template): New function.
	(end_member_template_processing): Rename, and modify, to become...
	(maybe_end_member_template_processing).
	(build_template_parm_index): New function.
	(reduce_template_parm_level): New function.
	(process_template_parm): Modify to use build_template_parm_index.
	(current_template_args): Change name to current_template_parms.
	(push_template_decl): Deal with friend templates.
	(uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
	TEMPLATE_CONST_PARM.
	(tsubst_friend_function): New function.
	(instantiate_class_template): Generate the DECL_FRIENDLIST
	for a new instantiation by using tsubst_friend_function rather
	than just tsubst.
	(tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
	Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
	appropriate new macros.  Use reduce_template_parm_level to
	generate lower-level template parameters.  Handle tsubst'ing into
	TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
	to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
	templates.  Similarly for the template parameters for a new
	template.
	(tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
	of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
	(unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
	(get_bindings): Call add_to_template_args if necessary.
	(instantiate_decl): Handle instantiations of friend templates.
	* search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
	TEMPLATE_TYPE_PARM as a list of fields; it's not!
	* spew.c (yylex): Do a little manual constant propogation to
	clarify the code.

From-SVN: r18198
1998-02-22 22:17:44 -05:00
Mark Mitchell
06ab59dfa0 tree.c (is_overloaded_fn): Use really_overloaded_fn.
* tree.c (is_overloaded_fn): Use really_overloaded_fn.
	(really_overloaded_fn): Move check here from is_overloaded_fn.
	(get_first_fn): Use really_overloaded_fn and is_overloaded_fn.

From-SVN: r17863
1998-02-11 22:47:30 +00:00
Mark Mitchell
67da32876e parse.y (primary): Deal with statement-expressions in templates.
* parse.y (primary): Deal with statement-expressions in
	templates.
	* pt.c (tsubst_copy): Handle BIND_EXPR.
	* tree.c (mapcar): Likewise.

From-SVN: r17611
1998-02-02 20:33:09 -05:00
Kaveh R. Ghazi
a703fb388b Various fixes for -Wall problems from Kaveh. See ChangeLog for details.
From-SVN: r17586
1998-02-01 17:04:13 -07:00
Jason Merrill
abff8e0691 class.c (instantiate_type): Don't just return a known type if it's wrong.
* class.c (instantiate_type): Don't just return a known type if
 	it's wrong.
	* class.c (instantiate_type): Remove handling of FUNCTION_DECL
	since that code could never be reached.
	* error.c (dump_decl): Avoid aborting in the midst of printing an
	error message about an illegal template declaration.
	* parse.y (structsp): Print an error message, rather than crashing,
	when a class-head does not name a class.
	* pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
	template arguments as a g++ extension.
	* cp-tree.def (ALIGNOF_EXPR): New tree code.
	* decl2.c (grok_alignof): If processing_template_decl, just store
	the expression.
	* typeck.c (c_alignof): Likewise.
	* decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
	* error.c (dump_expr): Likewise.
	* pt.c (tsubst_copy): Likewise.
	* tree.c (cp_tree_equal): Likewise.
	* pt.c (uses_template_parms): Correctly determine whether or not a
	SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
	folding can be done.

From-SVN: r17545
1998-01-28 19:08:53 -05:00
Mark Mitchell
e1467ff26b call.c (add_template_candidate_real): New function.
* call.c (add_template_candidate_real): New function.
	(add_template_candidate): Use it.
	(add_template_conv_candidate): Likewise.
	(joust): Pass extra argument to more_specialized.
	* class.c (instantiate_type): Handle a single FUNCTION_DECL.
	(is_local_class): Remove.
	(finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
	* cp-tree.h (is_local_class): Remove.
	(perform_array_to_pointer_conversion): Likewise.
	(finish_member_template_decl): Add.
	(check_explicit_specialization): Return a tree, not an int.
	(more_specialized): Take additional argument.
	(get_bindings): Likewise.
	(TI_PENDING_SPECIALIZATION_FLAG): New macro.
	* cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
	(perform_array_to_pointer_conversion): Remove.
	* decl.c (saved_scope): Add processing_specialization,
	processing_explicit_instantiation fields.
	(maybe_push_to_top_level): Save them.
	(pop_from_top_level): Restore them.
	(grokfndecl): Use new return value from
	check_explicit_specialization.
	(start_decl): Don't check flag_guiding_decls before pushing
	decls.
	(cp_finish_decl): Remove previous (bogus) change.
	(grok_declarator): Use decl_function_context rather than
	is_local_class.
	* decl2.c (finish_file): Pass extra argument to get_bindings.
	(build_expr_from_tree): Let build_x_component_ref check
	validity of arguments rather than doing it here.
	* lex.c (cons_up_default_function): Remove code fooling with
	processing_specialization, processing_explicit_instantiation
	flags, as that is now done in {maybe_push_top,pop_from}_top_level.
	* method.c (build_overload_identifier): Mangle local classes in
	template functions correctly.
	* parse.y (finish_member_template_decl): Move to pt.c.
	* pt.c (finish_member_template_decl): Moved here from parse.y.
	(print_candidates): New function.
	(determine_specialization): Change interface.  Properly look for
	most specialized versions of template candidates.
	(check_explicit_specialization): Fully process explicit
	instantiations.
	(push_template_decl): Avoid looking at CLASSTYPE fields in
	FUNCTION_DECLS.
	(determine_overloaded_function): Remove.
	(convert_nontype_argument): Change name from
	convert_nontype_parameter.  Use determine_overloaded_function
	instead of instantiate_type.
	(mangle_class_name_for_template): Handle type contexts as well as
	function contexts.
	(classtype_mangled_name): Likewise.
	(lookup_template_class): Likewise.
	(tsubst): Likewise.
	(more_specialized): Take explict template arguments as a
	parameter.
	(most_specialized): Likewise.
	(get_bindings): Likewise.  Check that return types match before
	proclaiming a function a match.
	(do_decl_instantiation): Remove code searching for function to
	instantiate; that is now done in check_explicit_specialization.
	(add_maybe_template): Pass extra argument to get_bindings.
	* tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
	implementation.
	* typeck.c (build_component_ref): Check for invalid arguments.

From-SVN: r17512
1998-01-27 15:47:56 -05:00
Kriang Lerdsuwanakij
73b0fce8fd pt.c (coerce_template_parms): Don't access elements of ARGLIST that is not really present.
Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
	* pt.c (coerce_template_parms): Don't access elements of ARGLIST
	that is not really present.  Substitute default arguments in
	template template arguments.  Correctly convert TEMPLATE_DECL to
	TEMPLATE_TEMPLATE_PARM.
	(comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
	are no longer treated specially here.
	* parse.y (template_template_parm): Fix copy error.
	* decl.c (grokdeclarator): Warn about missing `typename' for nested
	type created from template template parameters.
	* parse.y (bad_parm): Likewise
	* class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
	(push_nested_class): Likewise.
	* cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
	* cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
	(copy_template_template_parm): Declare.
	* decl.c (arg_looking_for_template): New variable.
	(lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
	Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
	node if arg_looking_for_template is nonzero.
	(pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
	(grok_op_properties, xref_tag, xref_basetypes): Likewise.
	(grokdeclarator): Handle TEMPLATE_DECL.
	* decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
	* error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
	(dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
	(dump_decl): Handle unnamed template type parameters.
	Handle template template parameters.
	(dump_function_name): Handle template template parameters.
	* init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
	Handle TEMPLATE_TEMPLATE_PARM.
	* method.c (build_template_template_parm_names): New function.
	(build_template_parm_names): Handle TEMPLATE_DECL.
	(build_overload_nested_name, build_overload_name):
	Handle TEMPLATE_TEMPLATE_PARM.
	* parse.y (maybe_identifier): New nonterminal.
	(template_type_parm): Use it.
	(template_template_parm, template_arg1): New nonterminal.
	(template_parm): Add template_template_parm rules.
	(template_arg): Set processing_template_arg.
	(template_arg1): Rules moved from template_arg.
	(primary, nonnested_type): Set arg_looking_for_template if we are
	processing template arguments.
	* pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
	(process_template_parm): Handle template template parameters.
	(coerce_template_parms, comp_template_args): Likewise.
	(mangle_class_name_for_template, lookup_template_class): Likewise.
	(uses_template_parms): Handle TEMPLATE_DECL and
	TEMPLATE_TEMPLATE_PARM.
	(current_template_args): Handle TEMPLATE_DECL.
	(tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
	* search.c (dfs_walk, dfs_record_inheritance):
	Handle TEMPLATE_TEMPLATE_PARM.
	* tree.c (copy_template_template_parm): New function.
	(mapcar): Handle TEMPLATE_TEMPLATE_PARM.
	* typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.

From-SVN: r17441
1998-01-22 06:03:56 -05:00
Mark Mitchell
7565064686 decl.c (start_decl): Don't allow duplicate definitions of static data members.
* decl.c (start_decl): Don't allow duplicate definitions of static
	data members.
	* call.c (build_user_type_conversion_1): Handle user-defined
	template conversion operators correctly.
	* decl2.c (build_expr_from_tree): Issue an error message if the
	object in a COMPONENT_REF is a TEMPLATE_DECL.
	* typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
	* class.c (is_local_class): New function.
	* cp-tree.h (is_local_class): Declare it.
	(last_tree): Likewise.
	(begin_tree): Likewise.
	(end_tree): Likewise.
	(lookup_template_class): Change prototype.
	* decl.c (cp_finish_decl): Check for NULL where necesary.
	Consider FUNCTION_DECLS to declare objects with top-level binding,
	when calling make_decl_rtl.
	(grokdeclarator): Give members of local classes internal linkage.
	(start_function): Remove declaration of last_tree.
	(finish_function): Set flag_keep_inline_functions around call to
	rest_of_compilation if we are processing a member function in a
	local class.
	(start_method): Call push_template_decl for member functions of
	local classes in template functions.
	* decl2.c (import_export_decl): Don't give external linkage to
	instantiations of templates with internal linkage.
	* parse.y (last_tree): Remove declaration.
	(template_type): Pass extra parameter to lookup_template_class.
	(self_template_type): Likewise.
	(structsp): Move call to reset_specialization into left_curly.
	(left_curly): Call reset_specialization, and begin_tree.
	* pt.c (saved_trees): New variable.
	(mangle_class_name_for_template): Change prototype.  Use
	additional function context to name local classes in templates
	correctly.
	(classtype_mangled_name): Pass the context.
	(push_template_decl): Handle local classes and templates, and
	member functions for such classes.
	(convert_nontype_parameter): Fix handling of pointer-to-member
	constants.
	(lookup_template_class): Handle local classes in templates.
	(tsubst): Likewise.  Don't assume that template instantiations
	have external linkage; pay attention to the template declaration.
	(mark_decl_instantiated): Likewise.
	(begin_tree): New function.
	(end_tree): Likewise.
	* decl.c (xref_basetypes): Don't call complete_type for basetypes
	that involve template parameters; that can lead to infinite
	recursion unnecessarily.
	* pt.c (register_specialization): Do not register specializations
	that aren't ready to be registered yet.
	(check_explicit_specialization): Handle explicit specialization of
	constructors and destructors.
	(build_template_decl): New function.
	(push_template_delc): Handle out-of-class specializations of
	member templates.
        * pt.c (check_explicit_specialization): Set up the template
        information before registering the specialization.
        (coerce_template_parms): Fix thinko.
        (tsubst): Handle specializations of member templates correctly.
	* class.c (finish_struct_methods): Remove calls to
	check_explicit_specialization from here.
	(finish_struct): And insert them here.
	* cp-tree.h (perform_qualification_conversions): New function.
	(perform_array_to_pointer_conversion): Likewise.
	(begin_explicit_instantiation): Likewise.
	(end_explicit_instantiation): Likewise.
	(determine_specialization): Renamed from
	determine_explicit_specialization.
	(comp_template_parms): New function.
	(processing_explicit_instantiation): New variable.
	* cvt.c (perform_qualification_conversions): New function.
	(perform_array_to_pointer_conversion): Likewise.
	* decl.c (duplicate_decls): Don't consider template functions
	alike unless they have the same parameters.  Refine handling of
	instantiation/specialization mismatches.
	(start_decl): Don't call pushdecl for template specializations,
	since they don't affect overloading.
	(start_function): Likewise
	(grokfndecl): Call check_explicit_specialization a little later.
	Don't call duplicate_decls for memberm template specializations.
	(grokdeclarator): Don't update template_count for classes that are
	themselves specializations.  Remove use of `2' as parameter to
	grokfndecl since that value isn't used.
	* lex.c (cons_up_default_function): Save and restore
	processing_explicit_instantiation around calls to grokfield.
	* parse.y (finish_member_template_decl): New function.
	(component_decl_1): Use it.
	(fn.def2): Likewise.
	(template_arg_list_opt): New nonterminal.
	(template_type): Use it.
	(self_template_type): Likewise.
	(template_id): Likewise.
	(object_template_id): Likewise.
	(notype_template_declarator): Likwise.
	(begin_explicit_instantiation): Likewise.
	(end_explicit_instantiation): Likewise.
	(explicit_instantiation): Use them.
	* pt.c (coerce_template_parms): Add parameters.
	(processing_explicit_instantiation): New variable.
	(convert_nontype_parameter): New function.
	(determine_overloaded_function): Likewise.
	(begin_explicit_instantiation): Likewise.
	(end_explicit_instantiation): Likewise.
	(retrieve_specialization): Likewise.
	(register_specialization): Likewise.
	(processing_explicit_specialization): Removed.
	(determine_specialization): Handle specializations of member
	functions of template class instantiations.
	(check_explicit_specialization): Refine to conform to standard.
	(comp_template_parms): New function.
	(coerce_template_parms): Call convert_nontype_parameter.
	(tsubst): Refine handling of member templates.  Use
	register_specialization.
	(instantiate_template): Use retrieve_specialization.
	(do_decl_instantiation): Likewise.
	(instantiate_decl): Likewise.
	(type_unification): Improve handling of explict template
	arguments.
	* tree.c (mapcar): Return error_mark_node, rather than aborting,
	on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
	* typeck.c (build_unary_op): Call determine_specialization, rather
	than determine_explicit_specialization.

From-SVN: r17426
1998-01-19 17:41:40 -05:00
Kaveh R. Ghazi
7f85441b70 call.c (add_builtin_candidate): Add default case in enumeration switch.
* call.c (add_builtin_candidate): Add default case in enumeration
        switch.
        (build_new_op): Likewise.
        (convert_like): Likewise.
        * cvt.c (build_expr_type_conversion): Likewise.
        * tree.c (real_lvalue_p): Likewise.
        (lvalue_p): Likewise.
        (cp_tree_equal): Likewise.
        * typeck.c (comptypes): Likewise.
        (build_component_ref): Likewise.
        (build_function_call_real): Likewise.
        (build_binary_op_nodefault): Likewise.
        (build_unary_op): Likewise.
        (build_modify_expr): Likewise.
        * typeck2.c (initializer_constant_valid_p): Likewise.

From-SVN: r17187
1997-12-22 02:35:49 -07:00
Jason Merrill
0253134551 except.c: Remove register_exception_table{,_p}.
* except.c: Remove register_exception_table{,_p}.
	* decl2.c (finish_file): Remove call to register_exception_table.
	* cp-tree.def: Add AGGR_INIT_EXPR.
	* error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
	AGGR_INIT_EXPR where appropriate.
	* expr.c (cplus_expand_expr): Likewise.  Simplify.

From-SVN: r17132
1997-12-18 09:52:24 -05:00
Jason Merrill
6748b64398 tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
* tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
	* error.c (dump_expr): Likewise.

From-SVN: r17115
1997-12-16 11:51:07 -05:00
Jason Merrill
aa36c0813a tree.c (is_overloaded_fn): Handle getting a fn template.
* tree.c (is_overloaded_fn): Handle getting a fn template.
	(really_overloaded_fn): Likewise.
	* error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
	* pt.c (check_explicit_specialization): Tweak.
	(determine_explicit_specialization): Tweak.

	* tree.c, cp-tree.h (get_target_expr): New fn.

1997-12-02  Mark Mitchell  <mmitchell@usa.net>

	* pt.c (determine_explicit_specialization): Avoid an internal
	error for bad specializations.

	* method.c (build_overload_value): Handle SCOPE_REF.

From-SVN: r16928
1997-12-03 14:46:56 -05:00
Jason Merrill
5951f637bc decl.c (make_implicit_typename): Handle case where t is not actually from context.
* decl.c (make_implicit_typename): Handle case where t is not
 	actually from context.
	* tree.c (get_type_decl): Lose identifier case.
	* spew.c (yylex): Lose useless call to identifer_typedecl_value.
	* parse.y (nonnested_type): Just use lookup_name.
	(complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.

Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>

	* error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
	T was built in C language context (for example, by
	output_func_start_profiler).

From-SVN: r16589
1997-11-19 23:07:26 -05:00
Jason Merrill
00d3396fdb call.c (build_new_method_call): Handle getting a TEMPLATE_ID_EXPR around a TEMPLATE_DECL.
* call.c (build_new_method_call): Handle getting a
 	TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
 	if we got template parms.
	* typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
 	not just the args.
	* decl2.c (build_expr_from_tree): Tweak last change.
	* pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
	(maybe_fold_nontype_arg): Split out from tsubst_copy.
	* tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.

Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>

	* pt.c (tsubst_copy): Handle explicit template arguments in
	function calls.
	* typeck.c (build_x_function_call): Likewise.
	* decl2.c (build_expr_from_tree): Lookup function name if it
	hasn't been done.

	* pt.c (tsubst): Instantiate template functions properly when
	template parameter does not appear in function arguments and return
	type.
	(comp_template_args): Handle member templates required by tsubst.

From-SVN: r16427
1997-11-11 02:09:58 -05:00
Jason Merrill
c7ae64f2cc stmt.c (expand_decl_cleanup_no_eh): New fn.
* stmt.c (expand_decl_cleanup_no_eh): New fn.

	* except.c (expand_leftover_cleanups): do_pending_stack_adjust.

	Complete nested exception support.
	* except.c (do_pop_exception): Split out...
	(push_eh_cleanup): From here.  Handle the EH region by hand.
	(expand_start_catch_block): Add a new level for the catch parm.
	Move the rethrow region outside the two cleanup regions.
	Protect the initializer for the catch parm with terminate.
	(expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
	* exception.cc (__cp_pop_exception): Now takes two parms.  Handle
	popping off the middle of the stack.
	* tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
	WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
	(build_cplus_new): Only wrap CALL_EXPRs.
	* init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
	the constructor call.

From-SVN: r16419
1997-11-10 15:03:49 -05:00
Jason Merrill
e66d884e7b cp-tree.h (scratchalloc, [...]): Define as macros for now.
* cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
	scratch_tree_cons): Define as macros for now.
	* call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
	lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
	typeck2.c: Use them and the expression_obstack variants.

From-SVN: r15900
1997-10-14 14:59:03 -04:00
Brendan Kehoe
bfcbf73e1d tree.c (print_lang_statistics): #if 0 call to print_inline_obstack_statistics until its definition is checked in.
* tree.c (print_lang_statistics): #if 0 call to
	print_inline_obstack_statistics until its definition is checked in.

the definition of the fn's not checked in yet by jason

From-SVN: r15848
1997-10-06 17:09:23 -04:00
Jason Merrill
27bb83393c pt.c (instantiate_decl): Look for the original template.
Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* pt.c (instantiate_decl): Look for the original template.
	(tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
	of member templates.

Fixes tstring.

From-SVN: r15838
1997-10-06 12:37:44 -04:00
H.J. Lu
9f6177175d Makefile.in (parse.o, decl.o): Also depend on $(srcdir)/../except.h $(srcdir)/../output.h.
Mon Sep 29 19:57:51 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* Makefile.in (parse.o, decl.o): Also depend on
	$(srcdir)/../except.h $(srcdir)/../output.h.
	(decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
	$(srcdir)/../except.h $(srcdir)/../output.h.
	(typeck.o, init.o): Also depend on $(srcdir)/../expr.h
	../insn-codes.h.

	* call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.

	* expr.c (cplus_expand_expr): Make it static.

	* decl2.c, init.c, typeck.c: Include "expr.h".
	(expand_expr): Use proper values when calling the function.

From-SVN: r15801
1997-09-29 23:36:39 -04:00
Jason Merrill
386b8a85a6 [multiple changes]
Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* friend.c (do_friend): Disable injection for all template-derived
 	decls.
	* decl2.c (lang_decode_option): Handle -fguiding-decls.
	* parse.y (notype_template_declarator): New nonterminal.
	(direct_notype_declarator): Use it.
	(complex_direct_notype_declarator): Likewise.
	(object_template_id): Accept any kind of identifier after TEMPLATE.
	(notype_qualified_id): Don't add template declarators here.

Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>

        * call.c (add_template_candidate): Add explicit_targs parameter.
        (build_scoped_method_call): Use it.
        (build_overload_call_real): Likewise.
        (build_user_type_conversion_1): Likewise.
        (build_new_function_call): Likewise.
        (build_object_call): Likewise.
        (build_new_op): Likewise.
        (build_new_method_call): Likewise.
        (build_new_function_call): Handle TEMPLATE_ID_EXPR.
        (build_new_method_call): Likewise.

        * class.c (finish_struct_methods): Add specialization pass to
        determine which methods were specializing which other methods.
        (instantiate_type): Handle TEMPLATE_ID_EXPR.

        * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.

        * cp-tree.h (name_mangling_version): New variable.
	(flag_guiding_decls): Likewise.
        (build_template_decl_overload): New function.
        (begin_specialization): Likewise.
        (reset_specialization): Likewise.
        (end_specialization): Likewise.
        (determine_explicit_specialization): Likewise.
        (check_explicit_specialization): Likewise.
        (lookup_template_function): Likewise.
        (fn_type_unification): Add explicit_targs parameter.
        (type_unification): Likewise.

        * decl.c (duplicate_decls): Add smarts for explicit
        specializations.
        (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
        specializations.
        (grokfndecl): Call check_explicit_specialization.

        * decl2.c (lang_decode_option): Handle -fname-mangling-version.
        (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
        (check_classfn): Handle specializations.

        * error.c (dump_function_name): Print specialization arguments.

	* friend.c (do_friend): Don't call pushdecl for template
        instantiations.

        * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.

        * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
	and -fno-guiding-decls.

        * lex.c (identifier_type): Return PFUNCNAME for template function
        names.

        * method.c (build_decl_overload_real): New function.
        (build_template_parm_names): New function.
        (build_overload_identifier): Use it.
        (build_underscore_int): New function.
        (build_overload_int): Use it.  Add levels for template
        parameters.
        (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
        (build_overload_nested_names): Handle template type parameters.
        (build_template_decl_overload): New function.

        * parse.y (YYSTYPE): New ntype member.
        (nested_name_specifier): Use it.
        (nested_name_specifier_1): Likewise.
        (PFUNCNAME): New token.
        (template_id, object_template_id): New non-terminals.
        (template_parm_list): Note specializations.
        (template_def): Likewise.
        (structsp): Likewise.
        (fn.def2): Handle member template specializations.
        (component_decl_1): Likewise.
        (direct_notype_declarator): Handle template-ids.
        (component_decl_1): Likewise.
        (direct_notype_declarator): Handle template-ids.
        (primary): Handle TEMPLATE_ID_EXPR, and template-ids.

        * pt.c (processing_specializations): New variable.
        (template_header_count): Likewise.
        (type_unification_real): New function.
        (processing_explicit_specialization): Likewise.
        (note_template_header): Likewise.
        (is_member_template): Handle specializations.
        (end_template_decl): Call reset_specialization.
        (push_template_decl): Handle member template specializations.
        (tsubst): Likewise.
        (tsubst_copy): Handle TEMPLATE_ID_EXPR.
        (instantiate_template): Handle specializations.
        (instantiate_decl): Likewise.
        (fn_type_unification): Handle explicit_targs.
        (type_unification): Likewise.  Allow incomplete unification
        without an error message, if allow_incomplete.
        (get_bindings): Use new calling sequence for fn_type_unification.

        * spew.c (yylex): Handle PFUNCNAME.

        * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
        (really_overloaded_fn): Likewise.
        (get_first_fn): Handle function templates.

        * typeck.c (build_x_function_call): Use really_overloaded_fn.
        Handle TEMPLATE_ID_EXPR.
        (build_x_unary_op): Likewise.
        (build_unary_op): Likewise.
        (mark_addressable): Templates whose address is taken are marked
        as used.

From-SVN: r15774
1997-09-28 15:16:59 -04:00
Jason Merrill
98c1c66880 class.c (grow_method): Remove check for redeclaration.
* class.c (grow_method): Remove check for redeclaration.

Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>

	* cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
	(DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
	(PRIMARY_TEMPLATE_P): Use it.
	* call.c (build_overload_call_real): Use it.
	* class.c (instantiate_type): Likewise.
	* decl.c (decls_match): Likewise.
	* method.c (build_overload_identifier): Likewise.
	* pt.c (push_template_decl): Likewise.
	(classtype_mangled_name): Likewise.
	(lookup_template_class): Likewise.

	* cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
	DECL_NTPARMS to conform to usage elsewhere.
	* call.c (add_template_candidate): Likewise.
	* class.c (instantiate_type): Likewise.
	* pt.c (instantiate_template): Likewise.
	(get_bindings): Likewise.

	* class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
	is_member_template.

	* pt.c (unify): Undo changes to allow multiple levels of template
	parameters.
	(type_unification): Likewise.
	(fn_type_unification): Likewise.
	(get_class_bindings): Likewise.
	* cp-tree.h (Likewise).

	* decl.c (replace_defarg): Check that the type of the default
	parameter does not invlove a template type before complaining
	about the initialization.

	* error.c (dump_expr): Deal with template constant parameters in
	member templates correctly.

	* pt.c (is_member_template): Deal with class specializations
	correctly.
	(tsubst): Handle "partial instantiation" of member templates
	correctly.

Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>

	* pt.c (type_unification): Change calling squence to allow for
	multiple levels of template parameters.
	(tsubst_expr): Likewise.
	(tsubst): Likewise.
	(tsubst_copy): Likewise.
	(instantiate_template): Likewise.
	(unify): Likewise.
	* call.c (build_overload_call_real): Use it.
	(add_builtin_candidate): Use it.
	(build_new_method_call): Use it.
	* class.c (instantiate_type): Use it.
	* decl.c (grokdeclarator): Use it.
	* decl2.c (finish_file): Use it.
	* method.c (build_overload_identifier): Use it.

	* call.c (add_template_candidate):  Add additional parameter for
	the function return type.  Call fn_type_unification istead of
	type_unification.
	(build_user_type_conversion_1): Handle member templates.
	(build_new_function_call): Likewise.
	(build_new_op): Likewise.
	(build_new_method_call): Likewise.

	* class.c (grow_method): Don't give an error message indicating
 	that two member templates with the same name are ambiguous.
	(finish_struct): Treat member template functions just like member
 	functions.

	* cp-tree.h (check_member_template): Add declaration.
	(begin_member_template_processing): Likewise.
	(end_member_template_processing): Likewise.
	(fn_type_unification): Likewise.
	(is_member_template): Likewise.
	(tsubst): Change prototype.
	(tsubst_expr): Likewise.
	(tsubst_copy): Likewise.
	(instantiate_template): Likewise.
	(get_bindings): Likewise.

	* decl.c (decls_match): Handle multiple levels of template
	parameters.
	(pushdecl): Handle template type params just like other type
	declarations.
	(push_class_level_binding): Return immediately if the
	class_binding_level is NULL.
	(grokfndecl): If check_classfn() returns a member_template, use
	the result of the template, not the template itself.

	* decl2.c (check_member_template): New function.  Check to see
	that the entity declared to be a member template can be one.
	(check_classfn): Allow redeclaration of member template functions
	with different types; the new functions can be specializations or
	explicit instantiations.

	* error.c (dump_decl): Handle multiple levels of template
	parameters.
	(dump_function_decl): Update to handle function	templates.

	* lex.c (do_pending_inlines): Set up template parameter context
	for member templates.
	(process_next_inline): Likewise.

	* method. (build_overload_identifier): Adjust for multiple levels
	of template parameters.

	* parse.y (fn.def2): Add member templates.
	(component_decl_1): Likewise.

	* pt.c (begin_member_template_processing): New function.
	(end_member_template_processing): Likewise.
	(is_member_template): Likewise.
	(fn_type_unification): Likewise.
	(current_template_parms): Return a vector of all the template
	parms, not just the innermost level of parms.
	(push_template_decl): Deal with the possibility of member
	templates.
	(lookup_template_class): Likewise.
	(uses_template_parms): Likewise.
	(tsubst): Modify processing to TEMPLATE_TYPE_PARM and
	TEMPLATE_CONST_PARM to deal with multiple levels of template
	arguments.   Add processing of TEMPLATE_DECL to produce new
	TEMPLATE_DECLs from old ones.
	(do_decl_instantiation): Handle member templates.

	* search.c (lookup_fnfields_1): Handle member template conversion
	operators.

	* tree.c (cp_tree_equal): Check the levels, as well as the
	indices, of TEMPLATE_CONST_PARMs.

	* typeck.c (comptypes): Check the levels, as well as the indices,
	fo TEMPLATE_TYPE_PARMs.
	(build_x_function_call): Treat member templates like member
	functions.

Member templates.

From-SVN: r15130
1997-09-06 04:10:07 -04:00
Jason Merrill
49c249e1c8 [multiple changes]
Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* call.c (is_subseq): Don't try to be clever.

Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* parse.y, pt.c: Include "except.h".
	* call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
 	error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
 	lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
 	sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
 	prototyping.

Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* decl2.c (mark_vtable_entries): Instead of replacing pure
	virtuals with a reference to __pure_virtual, copy the decl and
	change the RTL.

From-SVN: r14868
1997-08-20 20:50:39 -04:00
Mike Stump
8dff10278c 92th Cygnus<->FSF quick merge
From-SVN: r14576
1997-08-01 17:21:46 +00:00
Brendan Kehoe
42976354a6 92th Cygnus<->FSF quick merge
From-SVN: r14524
1997-07-24 17:09:25 -04:00
Mike Stump
7834ab3923 92th Cygnus<->FSF merge
From-SVN: r14401
1997-07-08 00:17:49 +00:00
Mike Stump
37c46b43db 91th Cygnus<->FSF quick merge
From-SVN: r14134
1997-05-28 23:20:02 +00:00
Mike Stump
eb66be0e6c 91th Cygnus<->FSF merge
From-SVN: r13971
1997-04-23 22:39:53 +00:00
Mike Stump
bd6dd8453c 90th Cygnus<->FSF quick merge
From-SVN: r13831
1997-04-02 03:58:33 +00:00
Mike Stump
2ba25f504d 90th Cygnus<->FSF quick merge
From-SVN: r13673
1997-02-21 20:28:30 +00:00
Mike Stump
d2e5ee5c70 90th Cygnus<->FSF quick merge
From-SVN: r13321
1996-12-18 02:46:25 +00:00
Mike Stump
faf5394a1b 90th Cygnus<->FSF quick merge
From-SVN: r13319
1996-12-18 01:44:21 +00:00
Mike Stump
9a3b49acbc 90th Cygnus<->FSF quick merge
From-SVN: r13141
1996-11-12 19:49:48 +00:00
Mike Stump
5156628f9f 89th Cygnus<->FSF quick merge
From-SVN: r12883
1996-09-30 21:34:04 +00:00
Mike Stump
c11b6f21eb merging
From-SVN: r12700
1996-09-12 19:19:15 +00:00
Mike Stump
d11ad92ebe 88 Cygnus<->FSF merge
From-SVN: r12674
1996-08-26 20:32:48 +00:00
Jason Merrill
73aad9b9ff 87th Cygnus<->FSF quick merge
From-SVN: r12630
1996-08-13 15:39:22 +00:00
Mike Stump
e92cc02916 87 Cygnus<->FSF merge
From-SVN: r12424
1996-07-11 01:13:25 +00:00
Mike Stump
e349ee739e 86th Cygnus<->FSF quick merge
From-SVN: r12126
1996-05-30 19:11:58 +00:00
Mike Stump
8a5d3064fb expr.c (expand_expr, [...]): Move from the C++ frontend to the backend where it belongs.
* expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
	frontend to the backend where it belongs.
	* tree.c (unsave_expr): Ditto.
	(unsave_expr_now): Ditto.
	* tree.def (UNSAVE_EXPR): Ditto.
	* cp-tree.h (unsave_expr): Ditto.
	(unsave_expr_now): Ditto.

From-SVN: r12016
1996-05-17 20:28:08 +00:00
Mike Stump
4ac1474483 86th Cygnus<->FSF quick merge
From-SVN: r11974
1996-05-16 18:43:00 +00:00
Mike Stump
4dabb3791d 86th Cygnus<->FSF quick merge
From-SVN: r11956
1996-05-08 18:18:35 +00:00
Mike Stump
67d743fe77 86th Cygnus<->FSF quick merge
From-SVN: r11877
1996-04-24 18:30:21 +00:00
Mike Stump
a80e41955a 86th Cygnus<->FSF quick merge
From-SVN: r11850
1996-04-19 00:48:03 +00:00
Mike Stump
fc37869868 85th Cygnus<->FSF quick merge
From-SVN: r11587
1996-03-21 19:46:11 +00:00
Mike Stump
357a4089d9 85th Cygnus<->FSF quick merge
From-SVN: r11506
1996-03-09 20:23:30 +00:00
Mike Stump
934c6b1387 85th Cygnus<->FSF quick merge
From-SVN: r11505
1996-03-09 19:44:47 +00:00
Mike Stump
e76a26469d 85th Cygnus<->FSF merge
From-SVN: r11497
1996-03-08 00:38:10 +00:00
Mike Stump
ec25526966 84th Cygnus<->FSF merge
From-SVN: r11399
1996-03-02 01:49:15 +00:00
Mike Stump
5566b478bd 83rd Cygnus<->FSF merge
From-SVN: r11362
1996-02-28 22:01:56 +00:00
Mike Stump
2ee887f272 81st Cygnus<->FSF merge
From-SVN: r11187
1996-02-09 22:43:25 +00:00
Mike Stump
9e9ff70986 80th Cygnus<->FSF merge
From-SVN: r11150
1996-02-01 19:32:00 +00:00
Mike Stump
455376771f 79th Cygnus<->FSF merge
From-SVN: r11082
1996-01-22 19:49:02 +00:00
Mike Stump
be99da7733 78th Cygnus<->FSF merge
From-SVN: r11039
1996-01-17 18:57:55 +00:00
Mike Stump
f30432d726 75th Cygnus<->FSF merge
From-SVN: r10438
1995-10-12 02:33:51 +00:00
Richard Kenner
abc95ed36d Fix spelling errors.
From-SVN: r10289
1995-08-28 06:54:22 -04:00
Richard Kenner
8ecb1d9245 Rename called function.
From-SVN: r10050
1995-06-22 22:51:13 -04:00
Richard Kenner
e9fa0c7c6f Update FSF address.
From-SVN: r9966
1995-06-15 08:29:51 -04:00
Mike Stump
878cd28949 73rd Cygnus<->FSF merge
From-SVN: r9826
1995-05-27 00:15:16 +00:00
Mike Stump
863adfc08e 69th Cygnus<->FSF merge
From-SVN: r9606
1995-05-10 02:58:06 +00:00
Mike Stump
e8abc66f60 67th Cygnus<->FSF merge
From-SVN: r9433
1995-04-24 17:27:46 +00:00
Mike Stump
71851aaa7c 61st Cygnus<->FSF merge
From-SVN: r9244
1995-03-29 20:32:43 +00:00
Mike Stump
28cbf42c14 59th Cygnus<->FSF merge
From-SVN: r9225
1995-03-23 00:44:31 +00:00
Mike Stump
b7484fbe2b 58th Cygnus<->FSF merge
From-SVN: r9186
1995-03-15 23:03:59 +00:00
Mike Stump
8ccc31eb61 56th Cygnus<->FSF merge
From-SVN: r8957
1995-02-16 15:24:37 +00:00
Mike Stump
e1cd6e56ad 53rd Cygnus<->FSF merge
From-SVN: r8794
1995-01-24 08:19:58 +00:00
Mike Stump
6060a79633 50th Cygnus<->FSF merge
From-SVN: r8657
1994-12-16 02:07:31 +00:00
Mike Stump
db5ae43ff2 49th Cygnus<->FSF merge
From-SVN: r8570
1994-11-29 00:59:16 +00:00
Jason Merrill
eae89e0400 *** empty log message ***
From-SVN: r8347
1994-10-27 01:22:58 +00:00
Mike Stump
f376e137d4 47th Cygnus<->FSF merge
From-SVN: r8129
1994-09-26 20:15:18 +00:00
Mike Stump
0059501924 46 Cygnus<->FSF merge
From-SVN: r7943
1994-08-18 20:50:43 +00:00
Mike Stump
a292b002ee 45th Cygnus<->FSF merge
From-SVN: r7862
1994-08-05 20:25:20 +00:00
Jason Merrill
0d16d68e44 Avoid warning building this file
From-SVN: r7761
1994-07-13 11:13:13 +00:00
Mike Stump
5b605f684e 44th Cygnus<->FSF merge
From-SVN: r7693
1994-07-09 07:13:10 +00:00
Jason Merrill
9a0e77ba13 43rd Cygnus<->FSF merge
From-SVN: r7660
1994-07-06 00:28:23 +00:00
Mike Stump
a32034654e 41st Cygnus<->FSF merge
From-SVN: r7553
1994-06-24 00:54:38 +00:00
Mike Stump
f0e01782d7 40th Cygnus<->FSF merge
From-SVN: r7493
1994-06-15 18:30:58 +00:00
Mike Stump
a0a339271a 39th Cygnus<->FSF merge
From-SVN: r7439
1994-06-03 21:42:31 +00:00
Mike Stump
2986ae008b 38th Cygnus<->FSF merge
From-SVN: r7337
1994-05-19 20:19:03 +00:00
Mike Stump
a4443a0855 37th Cygnus<->FSF merge
From-SVN: r7290
1994-05-13 02:46:07 +00:00
Mike Stump
8d2733caec 36th Cygnus<->FSF merge
From-SVN: r7221
1994-05-06 09:27:46 +00:00
Mike Stump
39211cd56b 34th Cygnus<->FSF merge
From-SVN: r7171
1994-04-28 22:48:45 +00:00
Mike Stump
7177d104dd 33rd Cygnus<->FSF merge
From-SVN: r7134
1994-04-21 23:30:18 +00:00
Mike Stump
8926095fe7 31th Cygnus<->FSF merge.
From-SVN: r6996
1994-04-08 06:08:43 +00:00
Mike Stump
51c184be09 30th Cygnus<->FSF merge.
From-SVN: r6859
1994-03-23 23:33:53 +00:00
Mike Stump
8d08fdba59 Initial revision
From-SVN: r6613
1994-02-24 01:02:37 +00:00