1. 09 Dec, 1998 1 commit
    • mmitchel's avatar
      * cp-tree.h (most_specialized_instantiation): New function. · 3effa7a7
      mmitchel authored
      	(print_candidates): Likewise.
      	* class.c (validate_lhs): Remove.
      	(resolve_address_of_overloaded_function): New function, split out
      	and then substantially reworked, from ...
      	(instantiate_type): Use it.  Simplify.
      	* cvt.c (convert_to_reference): Complain when caller has indicated
      	that's the right thing to do.  Don't crash if instantiate_type
      	fails.
      	* pt.c: Substitute `parameters' for `paramters' throughout.
      	(print_candidates): Don't make it static.
      	(most_specialized_instantiation): Split out from ...
      	(most_specialized): Here.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24225 138bc75d-0d04-0410-961f-82ee72b054a4
      3effa7a7
  2. 04 Dec, 1998 1 commit
    • jason's avatar
      * pt.c (check_template_shadow): New fn. · c24cced6
      jason authored
      	* decl2.c (grokfield): Use it.
      	* decl.c (pushdecl): Likewise.
      	(pushdecl_class_level): Likewise.
      	(start_method): Likewise.
      	(xref_tag): Don't try to use 't' if we're defining.
      Fixes Sec14/7/C14387.cm.
      	* call.c (check_dtor_name): Just return an error_mark_node.
      	* pt.c (lookup_template_class): Complain about using non-template here.
      	* parse.y (apparent_template_type): Not here.
      Fixes Sec14/C14339.cm.
      	* pt.c (check_explicit_specialization): Complain about specialization
      	with C linkage.
      Fixes Sec14/C14340.cm.
      	* lang-options.h: Add -f{no-,}implicit-inline-templates.
      	* pt.c (convert_nontype_argument): Don't assume that any integer
      	argument is intended to be a constant-expression.
      Fixes Sec14/7/P14245.C.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24086 138bc75d-0d04-0410-961f-82ee72b054a4
      c24cced6
  3. 29 Nov, 1998 1 commit
  4. 23 Nov, 1998 2 commits
  5. 21 Nov, 1998 1 commit
    • jason's avatar
      Handle specifying template args to member function templates. · acf0e4b3
      jason authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23740 138bc75d-0d04-0410-961f-82ee72b054a4
      acf0e4b3
  6. 19 Nov, 1998 1 commit
    • jason's avatar
      * semantics.c (begin_class_definition): Call · f646a0ac
      jason authored
      	maybe_process_partial_specialization before push_template_decl.
      	Don't call push_template_decl for a specialization.
      	* search.c (lookup_field): Do return a member template class.
      	* decl2.c (handle_class_head): Handle member template classes.
      	* decl.c (grokdeclarator): A parm type need not be complete.
      	* pt.c (convert_nontype_argument): Fix thinko.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23705 138bc75d-0d04-0410-961f-82ee72b054a4
      f646a0ac
  7. 17 Nov, 1998 2 commits
    • mmitchel's avatar
      * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses. · e4e283ec
      mmitchel authored
      	(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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23686 138bc75d-0d04-0410-961f-82ee72b054a4
      e4e283ec
    • jason's avatar
      * pt.c (tsubst): Add diagnostics for invalid array, reference · 71debe1f
      jason authored
      	and pointer to member types.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23684 138bc75d-0d04-0410-961f-82ee72b054a4
      71debe1f
  8. 16 Nov, 1998 1 commit
    • mmitchel's avatar
      * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro. · 4012c20a
      mmitchel authored
      	* decl.c (duplicate_decls): Remove special-case code to deal with
      	template friends, and just do the obvious thing.
      	* pt.c (register_specialization): Tweak for clarity, and also to
      	clear DECL_INITIAL for an instantiation before it is merged with a
      	specialization.
      	(check_explicit_specialization): Fix indentation.
      	(tsubst_friend_function): Handle both definitions in friend
      	declaration and outside friend declarations.
      	(tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
      	(regenerate_decl_from_template): Tweak accordingly.
      	(instantiate_decl): Likewise.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23674 138bc75d-0d04-0410-961f-82ee72b054a4
      4012c20a
  9. 15 Nov, 1998 1 commit
    • jason's avatar
      * decl.c (struct cp_function): Add named_label_uses. · d1c45f5d
      jason authored
      	(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
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23667 138bc75d-0d04-0410-961f-82ee72b054a4
      d1c45f5d
  10. 11 Nov, 1998 1 commit
    • jason's avatar
      * pt.c (try_one_overload): Take orig_targs again. Only check for · 07f4da33
      jason authored
      	mismatches against them; we don't care what a previous call found.
      	(resolve_overloaded_unification): Adjust.
      	* search.c (lookup_field): Don't return anything for a non-type
      	field from a dependent type.
      	* decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
      	in an array declarator.
      	(start_decl): Push into the class before looking for the field.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23605 138bc75d-0d04-0410-961f-82ee72b054a4
      07f4da33
  11. 08 Nov, 1998 1 commit
  12. 06 Nov, 1998 1 commit
    • mmitchel's avatar
      * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease · df5066e2
      mmitchel authored
      	size of dummy.
      	(DECL_DEFINED_IN_CLASS_P): New macro.
      	(TEMPLATE_PARMS_FOR_INLINE): Document.
      	(check_static_variable_definition): New function.
      	* decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
      	appropriate.
      	(check_static_variable_definition): Split out from ...
      	(grokdeclarator): Here.
      	* pt.c (check_default_tmpl_args): New function, split out from ...
      	(push_template_decl_real): Here.
      	(instantiate_template): Fix comment.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23549 138bc75d-0d04-0410-961f-82ee72b054a4
      df5066e2
  13. 03 Nov, 1998 2 commits
  14. 01 Nov, 1998 1 commit
    • mmitchel's avatar
      * cp-tree.h (COMPARE_STRICT): New macro. · daf9ff67
      mmitchel authored
      	(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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23490 138bc75d-0d04-0410-961f-82ee72b054a4
      daf9ff67
  15. 29 Oct, 1998 2 commits
  16. 28 Oct, 1998 4 commits
  17. 27 Oct, 1998 1 commit
    • jason's avatar
      * call.c (standard_conversion): instantiate_type here. · cc4d0855
      jason authored
      	(reference_binding): And here.
      	(implicit_conversion): Not here.
      	(build_op_delete_call): No need to cons up an OVERLOAD.
      	* cvt.c (cp_convert_to_pointer): instantiate_type here.
      	(convert_to_reference): And here.
      	* decl.c (grok_reference_init): Not here.
      	(grokparms): Or here.
      	* typeck2.c (digest_init): Or here.
      	* typeck.c (decay_conversion): Take the address of overloaded
      	functions, too.
      	(require_instantiated_type): Lose.
      	(convert_arguments): Don't handle unknown types here.
      	(build_c_cast): Likewise.
      	(build_binary_op): Gut.
      	(build_conditional_expr): Don't require_instantiated_type.
      	(build_modify_expr): Likewise.
      	(build_static_cast): Don't instantiate_type.
      	(build_reinterpret_cast): Likewise.
      	(build_const_cast): Likewise.
      	(convert_for_initialization): Likewise.
      	(build_ptrmemfunc): Use type_unknown_p.
      	(convert_for_assignment): Also do default_conversion on overloaded
      	functions.  Hand them off to ocp_convert.
      	* pt.c (convert_nontype_argument): Tell instantiate_type to complain.
      	Do complain about overload resolution producing a non-public fn.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23373 138bc75d-0d04-0410-961f-82ee72b054a4
      cc4d0855
  18. 26 Oct, 1998 1 commit
  19. 23 Oct, 1998 1 commit
    • mmitchel's avatar
      * cplus-dem.c (work_stuff): Replace const_type and volatile_type · 3e04bd45
      mmitchel authored
      	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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23258 138bc75d-0d04-0410-961f-82ee72b054a4
      3e04bd45
  20. 19 Oct, 1998 1 commit
    • jason's avatar
      Revamp references to member functions. · 2917b86f
      jason authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23186 138bc75d-0d04-0410-961f-82ee72b054a4
      2917b86f
  21. 17 Oct, 1998 1 commit
    • ghazi's avatar
      Warning fixes: · 7b2b8b98
      ghazi authored
              * 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23156 138bc75d-0d04-0410-961f-82ee72b054a4
      7b2b8b98
  22. 16 Oct, 1998 1 commit
  23. 14 Oct, 1998 2 commits
  24. 13 Oct, 1998 1 commit
  25. 11 Oct, 1998 1 commit
  26. 09 Oct, 1998 1 commit
    • jason's avatar
      * pt.c (resolve_overloaded_unification): New fn. · eaf0f63a
      jason authored
      	(try_one_overload): Likewise.
      	(unify): Don't fail on unknown type.
      	(type_unification_real): Likewise.  Use resolve_overloaded_unification
      	to handle an overloaded argument.
      	(template_args_equal): Split out...
      	(comp_template_args): From here.
      	(determine_specialization): Also allow a template with more
      	parms than were explicitly specified.
      	* cp-tree.h: Add template_args_equal.
      	* call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22951 138bc75d-0d04-0410-961f-82ee72b054a4
      eaf0f63a
  27. 06 Oct, 1998 2 commits
    • mmitchel's avatar
      * cp-tree.def (PTRMEM_CST): New tree node. · 0f2952a1
      mmitchel authored
      	* 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.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22869 138bc75d-0d04-0410-961f-82ee72b054a4
      0f2952a1
    • ghazi's avatar
      Warning fixes: · 8f8b0e45
      ghazi authored
              * Makefile.in (spew.o): Depend on toplev.h.
              * call.c (compare_ics): Initialize variables `deref_from_type2',
              `deref_to_type1' and `deref_to_type2'.
              * except.c (get_eh_type): Hide prototype and definition.
              (process_start_catch_block_old): Remove unused static prototype.
              * pt.c (tsubst_decl): Initialize variable `argvec'.
              * spew.c: Include toplev.h.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22864 138bc75d-0d04-0410-961f-82ee72b054a4
      8f8b0e45
  28. 05 Oct, 1998 1 commit
  29. 04 Oct, 1998 1 commit
  30. 25 Sep, 1998 1 commit
    • ghazi's avatar
      Warning fixes: · 6a44e72e
      ghazi authored
      	* cp-tree.h (define_case_label): Remove unused parameter.
      	(check_java_method): Likewise.
      	(grokclassfn): Likewise.
      	(expand_aggr_init): Likewise.
      	(build_x_delete): Likewise.
      	(maybe_end_member_template_processing): Likewise.
      	(unshare_base_binfos): Add prototype.
      	(string_conv_p): Likewise.
      	(my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
      	* cvt.c (build_up_reference): Remove unused parameter
       	`checkconst', all callers changed.
      	(build_type_conversion): Mark parameter `code' with
      	ATTRIBUTE_UNUSED.
      	(build_expr_type_conversion): Initialize variable `conv'.
      	* decl.c (push_namespace): Initialize variable `d'.
        	(define_case_label): Remove unused parameter `decl', all callers
       	changed.
      	* decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
       	`argc' with ATTRIBUTE_UNUSED.
      	(grokclassfn): Remove unused parameter `cname', all callers
       	changed.
      	(check_java_method): Likewise for parameter `ctype'.
      	(copy_assignment_arg_p): Mark parameter `virtualp' with
      	ATTRIBUTE_UNUSED.
      	(finish_prevtable_vardecl): Likewise for parameter `prev'.
      	* expr.c (extract_init): Likewise for parameters `decl' and `init'.
      	* init.c (expand_aggr_init_1): Remove unused parameter
       	`alias_this', all callers changed.
      	(expand_aggr_init): Likewise.
      	(expand_default_init): Likewise.
      	(build_new_1): Initialize variable `susp'.
      	(build_x_delete): Remove unused parameter `type', all callers
      	changed.
      	* lex.c (set_typedecl_interface_info): Mark parameter `prev' with
      	ATTRIBUTE_UNUSED.
      	(readescape): Use (unsigned) value in shift.
      	(real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
      	comparing to a signed quantity.
      	* pt.c (maybe_end_member_template_processing): Remove unused
       	parameter `decl', all callers changed.
      	(check_explicit_specialization): Add braces around empty body in
      	an else-statement.
      	(current_template_args): Initialize variable `args'.
      	(lookup_template_class): Likewise for variable `prev_local_enum'.
      	(tsubst_decl): Likewise for variable `r'.
      	(set_mangled_name_for_template_decl): Initialize variable
      	`context'.
      	* spew.c (scan_tokens): Change type of parameter `n' to unsigned.
      	Likewise for variable `i'.
      	(yylex): Initialize variable `trrr'.
      	* typeck.c (compparms): Mark variable `strict' with
      	ATTRIBUTE_UNUSED.
      	* xref.c (simplify_type): Cast argument of ctype function to
      	`unsigned char'.
      
      
      git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22587 138bc75d-0d04-0410-961f-82ee72b054a4
      6a44e72e
  31. 22 Sep, 1998 1 commit