X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fcp%2FChangeLog;h=0c520b5d5c32615cb458c3a9cd2acf14a5ccdac8;hb=6d55e44231a21f7dec16ce2a58db6480cb1fd3fd;hp=c5bfc5366d25edaebffa0e8d4a507f472ad8ecd6;hpb=62be7b3532d57047d87249f7ff2ee937b2d471af;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c5bfc5366d2..0c520b5d5c3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,328 @@ +1998-10-28 Jason Merrill + + * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here. + * decl.c (finish_function): Not here. + (start_function): Do set DECL_INITIAL. + + * pt.c (push_template_decl_real): Complain about default template + args for enclosing classes. + + * call.c (add_function_candidate): Treat conversion functions + as coming from the argument's class. + * cp-tree.h (DECL_CONV_FN_P): New fn. + (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE. + * class.c (add_method): Use DECL_CONV_FN_P. + * decl2.c (check_classfn): Likewise. + * error.c (dump_function_name): Likewise. + (dump_function_decl): Likewise. + * pt.c (fn_type_unification): Likewise. + * search.c (add_conversions): Likewise. + +1998-10-27 Jason Merrill + + * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL. + * method.c (hack_identifier): Also check for using RESULT_DECL + from outer context. + +1998-10-27 Mark Mitchell + + * decl.c (grokdeclarator): Use type_quals, rather than constp, + consistently. + +1998-10-27 Jason Merrill + + * call.c (standard_conversion): instantiate_type here. + (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. + +1998-10-26 Mark Mitchell + + * error.c (dump_decl): Deal with TEMPLATE_DECLs that are + VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type. + + * class.c (finish_struct_1): Use build_cplus_array_type to build + array types. + * decl.c (init_decl_processing): Likewise. + * except.c (expand_end_eh_spec): Likewise. + * search.c (expand_upcast_fixups): Simplify very slightly. + +1998-10-26 Jason Merrill + + * decl.c (grokdeclarator): Complain about a variable using + constructor syntax coming back null from start_decl. + + * friend.c (make_friend_class): Complain about trying to make + a non-class type a friend. + + * decl.c (grokfndecl): Set DECL_INITIAL for a defn here. + (start_function): Not here. + +1998-10-26 Brendan Kehoe + + * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration. + +1998-10-26 Jason Merrill + + * typeck2.c (process_init_constructor): Only skip anonymous fields + if they are bitfields. + + * 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. + +1998-10-26 Manfred Hollstein + + * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional. + +1998-10-26 Jason Merrill + + * typeck.c (convert_arguments): Don't handle pmf references + specially. + + * init.c (build_member_call): Don't try to convert to the base type + if it's ambiguous or pedantic. + + * typeck2.c (check_for_new_type): Only depend on pedantic for + C-style casts. + +1998-10-25 Mark Mitchell + + * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all + non-converting constructors. + +1998-10-24 Martin von Löwis + + * gxxint.texi: Correct documentation for n, N, Q, and B. + +1998-10-23 Martin von Löwis + + * parse.y (condition): Convert VAR_DECL from reference to indirect + reference. + +1998-10-23 Andrew MacLeod + + * exception.cc (__cp_pop_exception): Free the original exception + value, not the potentially coerced one. + +1998-10-23 Mark Mitchell + + * 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. + +1998-10-23 Jason Merrill + + * 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. + +1998-10-22 Martin von Löwis + + * parse.y (named_class_head): Push into class while parsing the + base class list. + * decl2.c (push_scope, pop_scope): New functions. + * cp-tree.h: Declare them. + * init.c (build_new_1): Delay cleanup until end of full expression. + +1998-10-21 Jason Merrill + + * typeck.c (build_component_ref): Use of a type here is an error. + +1998-10-19 Jason Merrill + + 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. + +1998-10-18 Martin von Löwis + + * decl2.c (validate_nonmember_using_decl): Fix using-directives of + std if std is ignored. + +1998-10-18 Jason Merrill + + * decl.c (grokvardecl): Fix thinko. + + * decl.c (grokdeclarator): Embedded attrs bind to the right, + not the left. + + * parse.y (fn.def2): Fix 'attrs' format. + +1998-10-18 Alastair J. Houghton + + * Makefile.in (CONFLICTS): Update. + * parse.y (expr_or_declarator_intern): New rule. + (expr_or_declarator, direct_notype_declarator, primary, + functional_cast): Use it. + (notype_declarator_intern): New rule. + (notype_declarator, complex_notype_declarator): Use it. + 1998-10-17 Jason Merrill * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.