X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fcp%2FChangeLog;h=071f8d6deb874ac1e3a3267c0d233d37d0a7c419;hb=d58b8a94df1930b85c8bf4b2ad3f51eb0532df2c;hp=3093f0d9c9a03d418eadd65dfc93edac5d1f8222;hpb=63ca08cfdb6e10a4784c00a1f9bf38a6d93a2580;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3093f0d9c9a..264683949cb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,1444 @@ +2010-11-01 Jason Merrill + + * decl2.c (decl_constant_var_p): New fn. + (decl_maybe_constant_var_p): New fn. + (mark_used): Rework instantiation of things needed for constant + expressions. + * cp-tree.h: Declare new fns. + * pt.c (instantiate_decl): Handle cp_unevaluated_operand. + (always_instantiate_p): Use decl_maybe_constant_var_p. + (instantiate_decl): Don't defer constexpr functions. + * repo.c (repo_emit_p): Use decl_maybe_constant_var_p. + * semantics.c (finish_id_expression): Use decl_constant_var_p. + Check for valid name in constant expr after mark_used. + +2010-10-31 Jason Merrill + + * class.c (is_really_empty_class): Work when type is not complete. + (synthesized_default_constructor_is_constexpr): New. + (add_implicitly_declared_members): Use it. + (type_has_constexpr_default_constructor): Likewise. + * cp-tree.h: Declare it. + * method.c (synthesized_method_walk): Use it. + + * decl.c (pop_switch): Use EXPR_LOC_OR_HERE. + * typeck.c (convert_for_assignment): Likewise. + + * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful + message about constexpr without -std=c++0x. + + * decl.c (grokdeclarator): Don't ICE on constexpr non-static data + member. + +2010-10-30 Nathan Froyd + + * class.c (layout_vtable_decl): Call build_array_of_n_type. + (build_vtt, build_ctor_vtabl_group): Likewise. + +2010-10-30 Nicola Pero + + Implemented Objective-C 2.0 @property, @synthesize and @dynamic. + * parser.c (cp_parser_objc_at_property_declaration): Removed + parsing of RID_COPIES and RID_IVAR. Updated call to + objc_add_property_declaration. + * typecheck.c (finish_class_member_access_expr): Call + objc_maybe_build_component_ref instead of objc_build_setter_call. + (cp_build_modify_expr): Call objc_maybe_build_modify_expr instead + of objc_build_getter_call. + +2010-10-27 Jason Merrill + + * cp-tree.h (cp_trait_kind): Add CPTK_IS_LITERAL_TYPE. + * cxx-pretty-print.c (pp_cxx_trait_expression): Handle it. + * semantics.c (trait_expr_value, finish_trait_expr): Likewise. + * parser.c (cp_parser_primary_expression): Handle RID_IS_LITERAL_TYPE. + (cp_parser_trait_expr): Likewise. + +2010-10-27 Gabriel Dos Reis + Jason Merrill + + * decl.c (finish_case_label): Use decl_constant_value. + + * method.c (synthesized_method_walk): Track constexprness too. + (process_subob_fn, walk_field_subobs): Likewise. + (implicitly_declare_fn): Set DECL_DECLARED_CONSTEXPR_P. + (defaulted_late_check): Handle DECL_DECLARED_CONSTEXPR_P. + * class.c (add_implicitly_declared_members): Handle + constexpr default ctor. + + * parser.c (cp_parser_ctor_initializer_opt_and_function_body): + Make sure a constexpr ctor has an empty body. + * class.c (type_has_constexpr_default_constructor): New. + * cp-tree.h: Declare it. + * init.c (perform_member_init): Complain about uninitialized + member in constexpr ctor. + (emit_mem_initializers): And uninitialized base. + * decl.c (check_tag_decl): Fix typo. + + * semantics.c (valid_type_in_constexpr_fundecl_p): New fn. + (is_valid_constexpr_fn): New fn. + (validate_constexpr_fundecl): Use it. + * decl.c (validate_constexpr_redeclaration): New. + (duplicate_decls): Use it. + (cp_finish_decl): Call validate_constexpr_fundecl and + ensure_literal_type_for_constexpr_object here. + (start_decl): Not here. Don't ICE on constexpr reference. + (check_for_uninitialized_const_var): Don't handle constexpr specially. + (grokfndecl): Set DECL_DECLARED_CONSTEXPR_P. + (check_static_variable_definition): Give friendly message about + missing constexpr. + (grokdeclarator): Complain about typedef and volatile with constexpr. + Reorganize. Give sorry about non-static data members in C++0x mode. + (start_preparsed_function): Check validate_constexpr_fundecl here. + (check_function_type): Not here. + * decl2.c (finish_static_data_member_decl): Don't complain about + in-class init. + * parser.c (CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR): New. + (cp_parser_condition): Pass it to cp_parser_decl_specifier_seq. + (cp_parser_decl_specifier_seq): Handle it. + (cp_parser_explicit_instantiation): Diagnose inline and constexpr. + + * class.c (check_bases): Propagate non-literality. + (check_field_decls): Likewise. + (finalize_literal_type_property): New. + (check_bases_and_members): Call it. + * cp-tree.h (TYPE_HAS_CONSTEXPR_CTOR): New. + (lang_type_class): Add has_constexpr_ctor field. + (DECL_DECLARED_CONSTEXPR_P): Strip template. + * decl.c (grok_special_member_properties): Set + TYPE_HAS_CONSTEXPR_CTOR. + +2010-10-27 Jason Merrill + + * call.c (build_integral_nontype_arg_conv): New. + * cp-tree.h: Declare it. + * pt.c (convert_nontype_argument): Use it. + + * error.c (dump_simple_decl): Print constexpr. + + * cvt.c (build_up_reference): Use target_type for the temporary var. + + * except.c (build_throw): Set EXPR_LOCATION. + + * tree.c (build_cplus_new): Handle CONSTRUCTOR. + + * semantics.c (finish_compound_stmt): Avoid creating an + unnecessary BIND_EXPR. + + * call.c (convert_like_real): Don't check narrowing if the element + is also an initializer-list. + +2010-10-27 Nicola Pero + + * parser.c (cp_parser_objc_at_property_declaration): Recognize + RID_ASSIGN, RID_COPY, RID_RETAIN, RID_READWRITE and RID_NONATOMIC. + Do not use objc_set_property_attr, but use local variables + instead. Detect repeated usage of setter, getter and ivar + attributes. Improved error processing when a setter name does not + end in ':'. Do not check for CPP_CLOSE_PAREN after we determined + that the token is a keyword. Updated call to + objc_add_property_declaration. + +2010-10-27 Nicola Pero + + * parser.c (cp_parser_objc_property_decl): Renamed to + cp_parser_objc_struct_declaration. Return the parsed trees + instead of calling objc_add_property_variable directly. Detect + missing or invalid declspecs. Implemented attributes. Do not eat + the ';' at the end. Exit loop whenever a non-comma is parsed, not + just EOF. + (cp_parser_objc_at_property): Renamed to + cp_parser_objc_at_property_declaration. Updated calls to + objc_add_property_variable, now objc_add_property_declaration, and + to cp_parser_objc_property_decl, now + cp_parser_objc_struct_declaration. Rewritten all code to be more + robust in dealing with syntax errors, and almost identical to the + one in c_parser_objc_at_property_declaration. + (cp_parser_objc_property_attrlist): Removed. + (cp_parser_objc_method_prototype_list): Updated call to + cp_parser_objc_at_property. + (cp_parser_objc_method_definition_list): Same change. + (cp_parser_objc_class_ivars): Detect a number of invalid + declarations of instance variables and produce errors when they + are found. + +2010-10-26 Jason Merrill + + * tree.c (build_vec_init_expr): Split out from... + (build_array_copy): ...here. + * init.c (perform_member_init): Use it. + * cp-tree.h: Declare it. + * cp-gimplify.c (cp_gimplify_init_expr): Don't gimplify the slot for + VEC_INIT_EXPR and AGGR_INIT_EXPR here. Drop pre/post parameters. + (cp_gimplify_expr): Handle array default-initialization via + VEC_INIT_EXPR. + + * tree.c (stabilize_expr): Handle xvalues properly. + + * call.c (build_over_call): Use argarray[0] for 'this' argument. + + * decl.c (finish_function): Don't look at function_depth. + +2010-10-25 Rodrigo Rivas Costa + + Implement opaque-enum-specifiers for C++0x. + * cp-tree.h (SET_OPAQUE_ENUM_P): New. + (OPAQUE_ENUM_P): New. + (ENUM_FIXED_UNDERLYING_TYPE_P): New. + (start_enum): Update prototype. + (finish_enum_value_list): New prototype. + * parser.c (cp_parser_elaborated_type_specifier): Issue a pedwarn if + "enum class" is used in an elaborated-type-specifier. + (cp_parser_enum_specifier): Rewrite to parse opaque-enum-specifiers. + * decl.c (copy_type_enum): New. + (finish_enum_value_list): New, with code from finish_enum. + (finish_enum): A lot of code removed. Added a gcc_assert. + (start_enum): Add parameters enumtype and is_new. + Rewrite to work with opaque-enum-specifiers. + * pt.c (maybe_process_partial_specialization): Allow for template + specialization of enumerations, with a pedwarn. + (lookup_template_class): Update call to start_enum. Call to + SET_OPAQUE_ENUM_P. + (tsubst_enum): Call to begin_scope, finish_scope and + finish_enum_value_list. + +2010-10-24 Nicola Pero + + Removed Objective-C++ specific replacement of cxx_printable_name. + * cp-objcp-common.h: Added LANG_HOOKS_DECL_PRINTABLE_NAME, set + to cxx_printable_name for both C++ and Objective-C++. + * cp-lang.h: Removed LANG_HOOKS_DECL_PRINTABLE_NAME. + + * error.c (dump_decl): For Objective-C++, call + objc_maybe_printable_name here ... + * tree.c (cxx_printable_name_internal): ... instead of here. + +2010-10-23 Nicola Pero + + * tree.c (cxx_printable_name_internal): In Objective-C++, call + objc_maybe_printable_name. + +2010-10-22 Jason Merrill + + PR c++/46129 + * pt.c (instantiate_class_template): Don't instantiate default + arguments. + + PR c++/46103 + * init.c (build_vec_init): Handle memberwise move. + +2010-10-21 Paolo Carlini + + PR c++/46117 + * call.c (add_function_candidate): Don't use TREE_VALUE on null + parmnode. + +2010-10-20 Nicola Pero + + * parser.c (cp_parser_objc_method_type): Mark inline. Return a + bool instead of calling objc_set_method_type. + (cp_parser_objc_method_signature): Updated calls to + cp_parser_objc_method_type and to objc_build_method_signature. + (cp_parser_objc_method_prototype_list): Updated calls to + objc_add_method_declaration. Use token->type to determine if it + is a class method or not. + (cp_parser_objc_method_definition_list): Same change. + +2010-10-20 Rodrigo Rivas Costa + + PR c++/46056 + * parser.c (cp_convert_range_for): Call cp_finish_decl + instead of finish_expr_stmt. + +2010-10-20 Nicola Pero + + * cp-lang.c (finish_file): Removed. + * decl2.c (cp_write_global_declarations): Call + objc_write_global_declarations when compiling Objective-C++. + +2010-10-19 Paolo Carlini + + PR c++/46046 + * pt.c (add_to_template_args): Check extra_args for error_mark_node. + (coerce_template_parms): Likewise for args. + +2010-10-18 Nicola Pero + + Implemented parsing @synthesize and @dynamic for Objective-C++. + * parser.c (cp_parser_objc_method_definition_list): Recognize + RID_AT_SYNTHESIZE and RID_AT_DYNAMIC. + (cp_parser_objc_at_dynamic_declaration): New. + (cp_parser_objc_at_synthesize_declaration): New. + +2010-10-18 Nicola Pero + + * parser.c (cp_parser_objc_identifier_list): Check the return + value of cp_parser_identifier and react if it is error_mark_node. + +2010-10-18 Nicola Pero + + Merge from apple/trunk branch on FSF servers. + + 2005-03-01 Fariborz Jahanian + + Radar 4451818 + * call.c (standard_conversion, implicit_conversion): Ignore + 'volatile' attribute of artificially volatized type in objc when + evaluating various conversion weights. + + 2005-11-08 Fariborz Jahanian + + Radar 4330422 + * typeck.c (comp_ptr_ttypes_real): Remove the hack. un-volatize the + artiificially 'volatized' type before doing pointer comparison. + +2010-10-18 Jakub Jelinek + + PR c/46015 + * semantics.c (finish_goto_stmt): Call mark_rvalue_use on computed + goto destination. + +2010-10-17 Nicola Pero + + Merge from apple/trunk branch on FSF servers. + + 2006-04-19 Fariborz Jahanian + + Radar 4516785 + * parser.c (cp_parser_simple_type_specifier): Don't lookup for + objc object types if type is scope qualified. + +2010-10-17 Nicola Pero + + Merge from apple/trunk branch on FSF servers. + + 2006-03-27 Fariborz Jahanian + + Radar 4133425 + * lex.c (unqualified_name_lookup_error): Issue diagnostic + for private 'ivar' access. + +2010-10-17 Iain Sandoe + + * parser.c (cp_parser_objc_visibility_spec): Update to use visibility + enum, and handle @package. + +2010-10-15 Jason Merrill + + PR c++/45983 + * tree.c (cp_build_qualified_type_real): Don't reuse a variant + with a different typedef variant of the element type. + +2010-10-14 Iain Sandoe + + merge from FSF apple 'trunk' branch. + 2006 Fariborz Jahanian + + Radars 4436866, 4505126, 4506903, 4517826 + * typeck.c (finish_class_member_access_expr): Handle CLASS.property + syntax. + (cp_build_modify_expr): Likewise. + * parser.c (cp_parser_objc_method_prototype_list): Handle @property. + (cp_parser_objc_method_definition_list): Likewise. + (cp_parser_objc_property_decl): New. + (cp_parser_objc_property_attrlist): New. + (cp_parser_objc_at_property): New. + +2010-10-14 Richard Guenther + + PR lto/44561 + * cp-tree.h (NULLPTR_TYPE_P): Adjust. + * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node, + use build_int_cst. + * error.c (dump_type): Handle NULLPTR_TYPE. + (dump_type_prefix): Likewise. + (dump_type_suffix): Likewise. + * mangle.c (write_type): Likewise. + * name-lookup.c (arg_assoc_type): Likewise. + * rtti.c (typeinfo_in_lib_p): Likewise. + * pt.c (tsubst): Likewise. + +2010-10-13 Jason Merrill + + PR c++/45984 + * class.c (fixup_attribute_variants): New fn. + * cp-tree.h: Declare it. + * pt.c (instantiate_class_template): Call it. + * semantics.c (begin_class_definition): Call it. + +2010-10-13 Richard Henderson + + * cp-lang.c (cp_eh_personality): Update call to + build_personality_function. + * except.c (choose_personality_routine): Update function comment. + +2010-10-13 Richard Guenther + + * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and + clear DECL_CHAIN of NAMESPACE_DECLs. + +2010-10-11 Martin Jambor + + PR c++/45562 + * cp-tree.h (current_class_ref): Check that cp_function_chain is + non-NULL. + * call.c (build_cxx_call): Likewise. + +2010-10-10 Jason Merrill + + * pt.c (tsubst_default_argument): Handle DEFAULT_ARG. + (tsubst_default_arguments): Only do this once for cloned fns. + (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't + handle expressions. + (tsubst_expr): Avoid calling tsubst_expr for non-expressions. + (tsubst_copy_and_build): Likewise. + (tsubst_initializer_list): Likewise. + (tsubst_copy): Change default to gcc_unreachable. Handle + OVERLOAD and PTRMEM_CST. + +2010-10-10 Jason Merrill + + PR lto/45959 + PR lto/45960 + * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type. + +2010-10-07 Andi Kleen + + * Make-lang.in (c++_OBJS): Remove dummy-checksum.o. + (cc1plus-dummy): Remove. + (cc1plus-checksum): Change to run checksum over object files + and options only. + +2010-10-08 Joseph Myers + + * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. + +2010-10-07 Nicola Pero + + * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to + tcc_expression. + * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for + AT_ENCODE_EXPR. + * error.c (dump_expr): Added case for AT_ENCODE_EXPR. + * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR. + (value_dependent_expression_p): Added case for AT_ENCODE_EXPR. + (type_dependent_expression_p): Added case for AT_ENCODE_EXPR. + * parser.c (cp_parser_objc_encode_expression): Updated comment. + +2010-10-07 Nicola Pero + + Merge from apple/trunk branch on FSF servers. + + 2006-04-26 Fariborz Jahanian + + Radar 4508851 + * parser.c (cp_parser_objc_interstitial_code): Recognize + and parse RID_NAMESPACE keyword. + +2010-10-07 Iain Sandoe + + * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after + finding ellipsis, before checking for attributes. + +2010-10-06 Nicola Pero + + Merge from apple/trunk branch on FSF servers. + * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no + longer existing gcc/c-common.def. + + 2005-12-14 Fariborz Jahanian + + Radar 4278774 + * pt.c (tsubst_copy_and_build): Instantiate @endcode(T). + * parser.c (cp_parser_objc_encode_expression): Build a templatized + parse tree for @encode(T). + + 2005-12-14 Fariborz Jahanian + + Radar 4278774 + * c-common.def: Add new expression code AT_ENCODE_EXPR. + +2010-10-06 Eric Botcazou + + PR c++/45908 + * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in + code folding offsetof-like computations. + +2010-10-05 Nicola Pero + + PR objc++/31125 + * parser.c (cp_parser_objc_class_interface): If no identifier + follows an @interface token, stop parsing the interface after + printing an error. + (cp_parser_objc_class_implementation): If no identifier follows an + @implementation token, stop parsing the implementation after + printing an error. + +2010-10-05 Nicola Pero + + PR objc++/23707 + * parser.c (cp_parser_objc_method_keyword_params): If the required + colon is not found while parsing parameters, stop parsing them. + +2010-10-05 Nicola Pero + + PR objc++/31126 + * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or + @end after detecting it. Print an error if @end is found without + a '}'. + (cp_parser_objc_method_prototype_list): Do not eat the EOF after + detecting it. Fixed reading the next token when continuing + because of an error in a method signature. Print an error if EOF + is found without an '@end'. + (cp_parser_objc_method_definition_list): Same change. + +2010-10-05 Nicola Pero + + Merge from apple/trunk branch on FSF servers: + + 2005-10-17 Fariborz Jahanian + + Radar 4290840 + * parser.c (cp_parser_objc_method_keyword_params): Check for valid + method parameters and issue error. + (cp_parser_objc_method_definition_list): Check for invalid tokens + which cannot start a function definition. + + 2005-10-14 Fariborz Jahanian + + Radar 4294425 + * parser.c (cp_parser_objc_message_args): Check for missing message + arguments and syntax error. + + 2005-10-13 Fariborz Jahanian + + Radar 4261146 + * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while + looking for '}'. + + 2005-08-15 Ziemowit Laski + + Radar 4093475 + * parser.c (cp_parser_objc_interstitial_code): Catch stray + '{' and '}' tokens and issue appropriate errors. + + 2005-08-02 Ziemowit Laski + + Radar 4185810 + (cp_parser_statement_seq_opt): In addition to '}' and + end-of-file, a statement sequence may also be terminated + by a stray '@end'. + +2010-10-05 Joseph Myers + + * cp-tree.h (cxx_print_error_function, + cxx_initialize_diagnostics): Declare using diagnostic_context + typedef. + +2010-10-04 Andi Kleen + + * Make-lang.in (g++, cc1plus): Add + to build rule. + +2010-10-04 Jason Merrill + + * tree.c (decl_storage_duration): New. + * cp-tree.h: Declare it. + (duration_kind): Return values. + +2010-10-03 Jason Merrill + + * typeck.c (require_complete_type_sfinae): Add complain parm to... + (require_complete_type): ...this function. + (cp_build_array_ref, convert_arguments): Use it. + (convert_for_initialization, cp_build_modify_expr): Likewise. + * cp-tree.h: Declare it. + * call.c (build_over_call): Use it. + +2010-09-30 Iain Sandoe + + merge from FSF 'apple/trunk' branch. + 2006-01-30 Fariborz Jahanian + + Radar 4386773 + * cp/parser.c (cp_parser_objc_interstitial_code): For + @optional/@required set the optional/required flag. + +2010-09-30 Nicola Pero + + * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments + and indentation when finding an Objective-C++ CPP_AT_NAME token. + +2010-09-29 Richard Guenther + + * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P. + (CP_TYPE_CONTEXT): Similar. + (FROB_CONTEXT): Frob global_namespace to the global + TRANSLATION_UNIT_DECL. + * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL, + set DECL_CONTEXT of global_namespace to it. + (start_decl): Use CP_DECL_CONTEXT and test TYPE_P + instead of zeroing context. + (cp_finish_decl): Use DECL_FILE_SCOPE_P. + (grokfndecl): Likewise. + (start_preparsed_function): Likewise. + * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P. + (namespace_binding): Use SCOPE_FILE_SCOPE_P. + * pt.c (template_class_depth): Use CP_TYPE_CONTEXT. + (is_specialization_of_friend): Use CP_DECL_CONTEXT. + (push_template_decl_real): Likewise. + (tsubst_friend_class): Likewise. Adjust context comparisons. + (instantiate_class_template): Use CP_TYPE_CONTEXT. + (tsubst): Do not substitute into TRANSLATION_UNIT_DECL. + * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use + SCOPE_FILE_SCOPE_P. + +2010-09-29 Yao Qi + + * decl.c (get_atexit_node): Fix typo. + +2010-09-28 Jason Merrill + + * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic. + (real_lvalue_p): Take const_tree. + * cp-tree.h: Adjust. + * typeck.c (lvalue_or_else): Make temporary arg a permerror. + (cp_build_addr_expr_1): Likewise. + +2010-09-28 Iain Sandoe + + Partially merged from apple/trunk branch on FSF servers: + 2006-04-26 Fariborz Jahanian + Radar 3803157 (method attributes) + + * parser.c (cp_parser_objc_method_keyword_params): Handle attributes. + (cp_parser_objc_method_tail_params_opt): Likewise. + (cp_parser_objc_method_signature): Likewise. + (cp_parser_objc_method_maybe_bad_prefix_attributes): New. + (cp_parser_objc_method_prototype_list): Handle attributes. + (cp_parser_objc_method_definition_list): Likewise. + +2010-09-28 Richard Henderson + + * cp-lang.c: Include "target.h". + (cp_eh_personality): Use targetm.except_unwind_info. + * Make-lang.in (cp-lang.o): Update deps. + +2010-09-28 Iain Sandoe + + * parser.c (cp_parser_objc_valid_prefix_attributes): New. + (cp_parser_declaration): Parse prefix attributes for ObjC++. + (cp_parser_objc_protocol_declaration): Handle attributes. + (cp_parser_objc_class_interface): Likewise. + (cp_parser_objc_declaration): Likewise. + +2010-09-27 Jason Merrill + + Require lvalues as specified by the standard. + * typeck.c (lvalue_or_else): Use real_lvalue_p. + (cp_build_addr_expr_1): Split out of cp_build_unary_op. + (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces. + (decay_conversion, get_member_function_from_ptrfunc): Adjust. + (build_x_unary_op, build_reinterpret_cast_1): Adjust. + (build_const_cast_1): Adjust. + * cp-tree.h: Declare new fns. + * call.c (build_this, convert_like_real, build_over_call): Adjust. + (initialize_reference): Adjust. + * class.c (build_base_path, convert_to_base_statically): Adjust. + (build_vfn_ref, resolve_address_of_overloaded_function): Adjust. + * cvt.c (build_up_reference, convert_to_reference): Adjust. + * decl.c (register_dtor_fn): Adjust. + * decl2.c (build_offset_ref_call_from_tree): Adjust. + * except.c (initialize_handler_parm): Adjust. + * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust. + * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust. + * tree.c (stabilize_expr): Adjust. + +2010-09-27 Nicola Pero + + Merge from apple/trunk branch on FSF servers: + + 2005-12-15 Fariborz Jahanian + + Radar 4229905 + * typeck.c (composite_pointer_type): Call objc_have_common_type + when comparing two objective-c pointer types. + + 2005-07-18 Ziemowit Laski + + Radar 4175534 + * call.c (standard_conversion): Do not issue warnings when + comparing ObjC pointer types. + + 2005-06-22 Ziemowit Laski + + Radar 4154928 + * call.c (standard_conversion): Allow for a pointer conversion + between any two ObjC pointer types. + * typeck.c (composite_pointer_type): Determine common type + for two ObjC pointer types. + +2010-09-24 Jan Hubicka + + * decl.c (finish_function): Use decl_replaceable_p + * method.c (make_alias_for_thunk): Update call of + cgraph_same_body_alias. + +2010-09-24 Jason Merrill + + * decl.c (compute_array_index_type): Remember type dependence of + array bound. + * pt.c (dependent_type_p_r): Don't recompute it here. + + * error.c (dump_expr) [CASE_CONVERT]: Print conversion between + reference and pointer to the same type as "*" or "&". + +2010-09-24 Nicola Pero + + * typeck.c (warn_args_num): Use warning 'too many arguments to + method [methodname]' for an Objective-C method instead of the less + satisfactory 'too many arguments to function' (with no method + name). + +2010-09-21 Jason Merrill + + * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1 + special handling if we know the member. + +2010-09-18 Jason Merrill + + * call.c (compare_ics): Do lvalue/rvalue reference binding + comparison for ck_list, too. + +2010-09-15 Jason Merrill + + * semantics.c (finish_id_expression): Diagnose use of function + parms in evaluated context outside function body. + + * decl2.c (grokbitfield): Diagnose non-integral width. + + * call.c (convert_like_real): Use the underlying type of the + reference for the temporary. + +2010-09-15 Jakub Jelinek + + PR c++/45635 + * class.c (build_vtbl_initializer): Use fn instead of init's operand + as first argument to FDESC_EXPR. + +2010-09-15 Paolo Carlini + + PR c++/45665 + * decl.c (grokdeclarator): Check build_memfn_type return value + for error_mark_node. + +2010-09-13 Rodrigo Rivas Costa + + * semantics.c (finish_for_stmt): Always test flag_new_for_scope. + (begin_range_for_stmt): Likewise. + +2010-09-11 Rodrigo Rivas + + Implement range-based for-statements. + * cp-tree.def (RANGE_FOR_STMT): New. + * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New. + (cp_convert_range_for): Declare. + * pt.c (tsubst_expr): Add RANGE_FOR_STMT. + (tsubst_copy_and_build): perform_koenig_lookup takes extra argument. + * semantics.c (begin_range_for_stmt): New. + (finish_range_for_decl): New. + (finish_for_stmt): Accept also RANGE_FOR_STMT. + (perform_koenig_lookup): Add extra argument include_std. + * parser.c (cp_parser_c_for): New with code from + cp_parser_iteration_statement(). + (cp_parser_range_for): New. + (cp_convert_range_for): New. + (cp_parser_iteration_statement): Add range-for support. + (cp_parser_condition): Adjust comment. + (cp_parser_postfix_expression): perform_koenig_lookup takes extra + argument. + * dump.c (cp_dump_tree): Add RANGE_FOR_STMT. + * cxx-pretty-print.c: Likewise. + * lex.c (cxx_init): Likewise. + * name-lookup.c (lookup_function_nonclass): Add extra argument + include_std. + (lookup_arg_dependent): Likewise. + * name-lookup.h: Likewise. + +2010-09-10 Rodrigo Rivas Costa + + PR c++/43824 + * error.c (maybe_warn_cpp0x): Add new warning + CPP0X_INLINE_NAMESPACES. + * parser.c (cp_parser_namespace_definition): Likewise. + * cp-tree.h (cpp0x_warn_str): Likewise. + +2010-09-10 Richard Guenther + + * decl.c (reshape_init_vector): For VECTOR_TYPEs, use + TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE. + +2010-09-10 Jan Hubicka + + PR tree-optimization/45605 + * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in + ADDR_EXPR. + +2010-09-08 Jakub Jelinek + + PR c++/45588 + * pt.c (tsubst) : Call mark_rvalue_use + before calling fold_decl_constant_value. + +2010-09-07 Arnaud Charlet + + * cp-tree.h (build_enumerator): Add new location_t parameter. + (build_lang_decl_loc): New function. + * decl.c (build_enumerator): New parameter loc. Use it when calling + build_decl. Replace build_lang_decl with build_lang_decl_loc. + * pt.c (tsubst_enum): Adjust call to build_enumerator. + * parser.c (cp_parser_enumerator_definition): Ditto. + * lex.c (build_lang_decl_loc): New function. + +2010-09-06 Dodji Seketeli + + PR c++/45200 + PR c++/45293 + PR c++/45558 + * tree.c (strip_typedefs): Strip typedefs from the context of + TYPENAME_TYPEs. + +2010-09-06 Mark Mitchell + + * typeck.c (cp_build_binary_op): Call do_warn_double_promotion. + * call.c (build_conditional_expr): Likewise. + (convert_arg_to_ellipsis): Likewise. + +2010-09-06 Arnaud Charlet + + * parser.c (make_pointer_declarator, make_reference_declarator, + make_call_declarator, make_array_declarator): Set declarator->id_loc. + (cp_parser_init_declarator): Adjust location of decl if appropriate. + +2010-09-06 Jason Merrill + + * call.c (implicit_conversion): Fix value-init of enums. + (convert_like_real): Likewise. + + * decl.c (cp_finish_decl): Don't change init for auto deduction. + + * pt.c (fold_non_dependent_expr_sfinae): Split out from... + (fold_non_dependent_expr): ...here. + (convert_nontype_argument): Use it. Take complain parm. + Use perform_implicit_conversion instead of ocp_convert. + Allow cv-qual changes. + (convert_template_argument): Pass complain down. + (tsubst_template_arg): Suppress constant expression warnings. + Don't fold here. + + * method.c (synthesized_method_walk): In constructors, also check + subobject destructors. + + * semantics.c (finish_compound_literal): Always build a + TARGET_EXPR. + +2010-08-30 Paolo Carlini + + PR c++/45043 + * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs. + +2010-08-30 Jakub Jelinek + + PR middle-end/45423 + * parser.c (cp_parser_omp_atomic): Handle boolean + {PRE,POST}_INCREMENT. + +2010-08-29 Jason Merrill + + PR c++/44991 + * parser.c (cp_parser_parameter_declaration): Pop parameter decls + after tentative parsing. + +2010-08-22 Joseph Myers + + * Make-lang.in (g++spec.o): Update dependencies. + * g++spec.c: Include opts.h + (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l". + (lang_specific_driver): Use cl_decoded_option structures. + +2010-08-20 Nathan Froyd + + * call.c: Use FOR_EACH_VEC_ELT. + * class.c: Likewise. + * decl.c: Likewise. + * decl2.c: Likewise. + * error.c: Likewise. + * except.c: Likewise. + * mangle.c: Likewise. + * method.c: Likewise. + * name-lookup.c: Likewise. + * parser.c: Likewise. + * pt.c: Likewise. + * repo.c: Likewise. + * semantics.c: Likewise. + * typeck2.c: Likewise. + +2010-08-19 Jason Merrill + + * call.c (reference_related_p): Check for error_mark_node. + (add_function_candidate): Check it instead of + same_type_ignoring_top_level_qualifiers_p. + + PR c++/45315 + * init.c (build_new_1): Don't use build_value_init in a template. + (build_value_init): Make sure we don't. + + PR c++/45307 + * cp-gimplify.c (cp_gimplify_expr): Also remove assignment + of empty class CONSTRUCTOR. + + * except.c (pending_noexcept, pending_noexcept_checks): New. + (perform_deferred_noexcept_checks): New. + (maybe_noexcept_warning): Split from... + (finish_noexcept_expr): ...here. Adjust. + * decl2.c (cp_write_global_declarations): Call + perform_deferred_noexcept_checks. + * cp-tree.h: And declare it. + +2010-08-18 Nathan Froyd + + PR c++/45049 + * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to + TREE_CHAIN. + +2010-08-17 Kai Tietz + + * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks, + or if -fms-extensions is enabled check, check permissive. + +2010-08-09 Jason Merrill + + PR c++/45236 + * pt.c (lookup_template_class): Don't re-coerce outer parms. + +2010-08-09 Nathan Froyd + + * call.c (add_builtin_candidates): Use VECs for local variable + `types'. Adjust remainder of function accordingly. + +2010-08-09 Nathan Froyd + + * name-lookup.c (is_associated_namespace): Convert local variables + to be VECs instead of TREE_LISTs. + +2010-08-09 Nathan Froyd + + * tree.c (varargs_function_p): Use stdarg_p. + +2010-08-07 Nathan Froyd + + * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it. + (cp_unparsed_functions_entry): Declare. Declare a VEC of it. + (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues. + Change type to a VEC. + (unparsed_funs_with_default_args): Define. + (unparsed_funs_with_definitions): Define. + (push_unparsed_function_queues): New function. + (cp_parser_new): Call it. + (pop_unparsed_function_queues): New function. + (cp_parser_class_specifier): Adjust processing of unparsed functions. + (cp_parser_template_declaration_after_export): Use VEC_safe_push. + (cp_parser_save_member_function_body): Likewise. + (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues + and pop_unparsed_function_queues. + (cp_parser_late_parsing_default_args): Likewise. + (cp_parser_save_default_args): Use VEC_safe_push. + +2010-08-07 Nathan Froyd + + * name-lookup.h (cp_label_binding): Declare. Declare a VEC type + containing it. + (cp_binding_level): Convert shadowed_labels and dead_vars_from_for + fields to VECs. + * decl.c (poplevel): Adjust for type changes. + (declare_local_label): Likewise. + +2010-08-06 Jason Merrill + + * typeck.c (complete_type_or_maybe_complain): Split out from... + (complete_type_or_else): Here. + (build_class_member_access_expr): Call it. + (finish_class_member_access_expr): Likewise. + * call.c (build_special_member_call): Likewise. + * cvt.c (build_expr_type_conversion): Likewise. + * init.c (build_new): Likewise. + * typeck2.c (build_functional_cast): Likewise. + * cp-tree.h: Declare it. + + * init.c (build_value_init): Add complain parm. + (build_value_init_noctor): Likewise. + (perform_member_init): Pass it. + (expand_aggr_init_1): Likewise. + (build_new_1): Likewise. + (build_vec_init): Likewise. + * pt.c (tsubst_expr): Likewise. + * typeck2.c (build_functional_cast): Likewise. + * cp-tree.h: Adjust. + * tree.c (build_target_expr_with_type): Handle error_mark_node. + + * typeck.c (decay_conversion): Any expression with type nullptr_t + decays to nullptr. + +2010-07-30 Ulrich Weigand + + PR c++/45112 + * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED. + +2010-07-27 Jason Merrill + + * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR + from build_value_init. + * init.c (build_value_init_noctor): Give error for unknown array + bound. + +2010-07-27 Joseph Myers + + * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove. + +2010-07-27 Joseph Myers + + * cp-objcp-common.c (cxx_initialize_diagnostics): First call + c_common_initialize_diagnostics. + * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK, + LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define. + +2010-07-21 Jason Merrill + + * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling. + + * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL + to cp_finish_decl. + +2010-07-20 Jeffrey Yasskin + + PR c++/44641 + * pt.c (instantiate_class_template): Propagate the template's + location to its instance. + +2010-07-20 Jason Merrill + + PR c++/44967 + * pt.c (tsubst_copy_and_build): Rework last change. + + PR c++/44967 + * pt.c (tsubst_copy_and_build): Handle partial substitution of + CALL_EXPR. + +2010-07-19 Jason Merrill + + PR c++/44996 + * semantics.c (finish_decltype_type): Correct decltype + of parenthesized rvalue reference variable. + + PR c++/44969 + * tree.c (cp_tree_equal): Compare type of *CAST_EXPR. + * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR. + +2010-07-19 Paolo Carlini + + PR c++/44969 + * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t + parameter. + * cp-tree.h: Adjust declaration. + * init.c (perform_member_init): Adjust caller. + * decl.c (grok_reference_init, cp_finish_decl): Likewise. + * typeck2.c (store_init_value): Likewise. + (build_functional_cast): Pass complain argument to + build_x_compound_expr_from_list. + +2010-07-16 Jason Merrill + + PR c++/32505 + * pt.c (process_partial_specialization): Diagnose partial + specialization after instantiation. + (most_specialized_class): Add complain parm. + + * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO. + +2010-07-15 Nathan Froyd + + * init.c (build_new_1): Use cp_build_function_call_nary instead of + cp_build_function_call. + +2010-07-15 Jason Merrill + + PR c++/44909 + * call.c (add_function_candidate): If we're working on an implicit + declaration, don't consider candidates that won't match. + * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn. + * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust. + + Revert: + * cp-tree.h (struct lang_type_class): Add has_user_opeq. + (TYPE_HAS_USER_OPEQ): New. + * decl.c (grok_special_member_properties): Set it. + * class.c (add_implicitly_declared_members): Don't lazily declare + constructors/operator= if a base or member has a user-declared one. + (check_bases_and_members, check_bases): Adjust. + (check_field_decls, check_field_decl): Adjust. + +2010-07-15 Anatoly Sokolov + + * decl.c (integer_three_node): Remove. + (cxx_init_decl_processing): Do not initialize the integer_three_node. + * cp-tree.h (integer_three_node): Remove. + +2010-07-15 Nathan Froyd + + * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN. + * call.c: Likewise. + * class.c: Likewise. + * cp-gimplify.c: Likewise. + * decl.c: Likewise. + * decl2.c: Likewise. + * init.c: Likewise. + * mangle.c: Likewise. + * name-lookup.c: Likewise. + * optimize.c: Likewise. + * parser.c: Likewise. + * pt.c: Likewise. + * rtti.c: Likewise. + * search.c: Likewise. + * semantics.c: Likewise. + * typeck.c: Likewise. + * typeck2.c: Likewise. + +2010-07-14 Jason Merrill + + * init.c (sort_mem_initializers): Rename "field_type" to "ctx". + (build_field_list): Cache field type. + + Implement C++0x unrestricted unions (N2544) + * class.c (check_field_decl): Loosen union handling in C++0x. + * method.c (walk_field_subobs): Split out from... + (synthesized_method_walk): ...here. Set msg before loops. + (process_subob_fn): Check for triviality in union members. + * init.c (sort_mem_initializers): Splice out uninitialized + anonymous unions and union members. + (push_base_cleanups): Don't automatically destroy anonymous unions + and union members. + +2010-07-13 Jason Merrill + + PR c++/44909 + * cp-tree.h (struct lang_type_class): Add has_user_opeq. + (TYPE_HAS_USER_OPEQ): New. + * decl.c (grok_special_member_properties): Set it. + * class.c (add_implicitly_declared_members): Don't lazily declare + constructors/operator= if a base or member has a user-declared one. + (check_bases_and_members, check_bases): Adjust. + (check_field_decls, check_field_decl): Adjust. + * method.c (synthesized_method_walk): Initialize check_vdtor. + + PR c++/44540 + * mangle.c (write_type): Canonicalize. + (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE. + (write_CV_qualifiers_for_type): Ignore them in abi>=5. + +2010-07-13 Paolo Carlini + + PR c++/44908 + * call.c (convert_like_real): Adjust convert_ptrmem call, pass + complain argument. + * typeck.c (get_delta_difference): Update prototype, add a + tsubst_flags_t parameter; update get_delta_difference_1 calls and + add checks for error_mark_node. + (get_delta_difference_1): Update prototype, add a tsubst_flags_t + parameter; update lookup_base call. + (build_ptrmemfunc): Update prototype, add a tsubst_flags_t + parameter; update get_delta_difference call and add check for + error_mark_node. + (convert_ptrmem): Update prototype, add a tsubst_flags_t + parameter; update get_delta_difference call and add check for + error_mark_node; update build_ptrmemfunc call. + (build_static_cast_1): Adjust convert_ptrmem call. + (expand_ptrmemfunc_cst): Adjust get_delta_difference call. + (cp_build_unary_op): Adjust build_ptrmemfunc call. + * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem + and build_ptrmemfunc calls. + * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes. + +2010-07-12 Paolo Carlini + + PR c++/44907 + * call.c (build_temp): Add tsubst_flags_t complain parameter; + adjust build_special_member_call call, pass complain. + (convert_like_real): Adjust build_temp call, pass complain. + +2010-07-09 Jason Merrill + + PR c++/43120 + * cp-tree.h (BV_LOST_PRIMARY): New macro. + * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic. + Set BV_LOST_PRIMARY. + (build_vtbl_initializer): Check BV_LOST_PRIMARY. + +2010-07-08 Jason Merrill + + PR c++/43120 + * class.c (update_vtable_entry_for_fn): Fix handling of dummy + virtual bases for covariant thunks. + +2010-07-08 Manuel López-Ibáñez + + * cp-tree.h: Do not include toplev.h. + +2010-07-06 Jason Merrill + + PR c++/44703 + * call.c (is_std_init_list): Look through typedefs. + + PR c++/44778 + * init.c (build_offset_ref): If scope isn't dependent, + don't exit early. Look at TYPE_MAIN_VARIANT. + * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution. + + * error.c (dump_function_decl): Don't crash on null DECL_NAME. + +2010-07-06 Shujing Zhao + + * cp-tree.h (impl_conv_void): New type. + (convert_to_void): Adjust prototype. + * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the + diagnostic for easy translation. Change caller. + * typeck.c: Update call to convert_to_void. + * semantics.c: Likewise. + * init.c: Likewise. + +2010-07-05 Nathan Froyd + + * decl.c (cp_finish_decl): Call add_local_decl. + * optimize.c (clone_body): Adjust for new type of cfun->local_decls. + +2010-07-05 Paolo Carlini + + * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it + throughout. + +2010-07-05 Shujing Zhao + + PR c++/22138 + * parser.c (cp_parser_primary_expression): Error if local template is + declared. + +2010-07-02 Le-Chun Wu + + PR/44128 + * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl + (variable or type) shadows another type. + +2010-07-02 Jakub Jelinek + + PR c++/44780 + * typeck.c (convert_for_assignment): When converting a convertible + vector type or objc++ types, call mark_rvalue_use. + * typeck2.c (build_m_component_ref): Use return values from + mark_rvalue_use or mark_lvalue_use. + * class.c (build_base_path): Likewise. + * call.c (build_conditional_expr): Likewise. + +2010-07-02 Paolo Carlini + + PR c++/44039 + * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields + returns NULL_TREE. + +2010-07-01 Richard Guenther + + * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs + predicate we are looking for, allow non-gimplified + INDIRECT_REFs. + +2010-06-30 Paolo Carlini + + PR c++/44628 + * typeck.c (cp_build_unary_op): Early return error_mark_node when + arg is NULL_TREE too. + * call.c (convert_class_to_reference): Return error_mark_node when + expr is NULL_TREE. + +2010-06-30 Michael Matz + + * repo.c (finish_repo): Fix typo. + +2010-06-30 Nathan Froyd + + * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block. + +2010-06-30 Nathan Froyd + + * repo.c (pending_repo): Change type to a VEC. + (finish_repo): Adjust for new type of pending_repo. + (repo_emit_p): Likewise. + +2010-06-30 Manuel López-Ibáñez + + * tree.c: Include gimple.h. Do not include tree-flow.h + * decl.c: Do not include tree-flow.h + * Make-lang.in: Adjust dependencies. + +2010-06-29 Nathan Froyd + + * decl.c (incomplete_var): Declare. Declare VECs containing them. + (incomplete_vars): Adjust comment. Change type to a VEC. + (maybe_register_incomplete_var): Adjust for new type. + (complete_vars): Adjust iteration over incomplete_vars. + +2010-06-29 Nathan Froyd + + * decl.c (struct named_label_entry): Change type of bad_decls field + to a VEC. + (poplevel_named_label_1): Adjust for new type of bad_decls. + (check_goto): Likewise. + +2010-06-29 Jason Merrill + + Enable implicitly declared move constructor/operator= (N3053). + * class.c (add_implicitly_declared_members): A class with no + explicitly declared copy or move constructor gets both declared + implicitly, and similarly for operator=. + (check_bases): A type with no copy ctor does not inhibit + a const copy ctor in a derived class. It does mean the derived + one is non-trivial. + (check_field_decl): Likewise. + (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial. + * tree.c (type_has_nontrivial_copy_init): Adjust semantics. + (trivially_copyable_p): Likewise. + * call.c (convert_like_real): Use type_has_nontrivial_copy_init. + * class.c (finish_struct_bits): Likewise. + * tree.c (build_target_expr_with_type): Likewise. + * typeck2.c (store_init_value): Likewise. + + Enable implicitly deleted functions (N2346) + * class.c (check_bases_and_members): Adjust lambda flags. + * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate. + + * decl2.c (mark_used): Adjust error for use of deleted function. + + Machinery to support implicit delete/move. + * cp-tree.h: (struct lang_type_class): Add lazy_move_assign, + has_complex_move_ctor, has_complex_move_assign bitfields. + (CLASSTYPE_LAZY_MOVE_ASSIGN): New. + (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New. + (TYPE_HAS_COMPLEX_MOVE_CTOR): New. + (enum special_function_kind): Add sfk_move_assignment. + (LOOKUP_SPECULATIVE): New. + * call.c (build_over_call): Return early if it's set. + (build_over_call): Use trivial_fn_p. + * class.c (check_bases): If the base has no default constructor, + the derived one is non-trivial. Handle move ctor/op=. + (check_field_decl): Likewise. + (check_bases_and_members): Handle move ctor/op=. + (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN. + (type_has_move_constructor, type_has_move_assign): New. + * decl.c (grok_special_member_properties): Handle move ctor/op=. + * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New. + (trivial_fn_p): New. + (do_build_copy_constructor): Use it. + (do_build_assign_ref): Likewise. Handle move assignment. + (build_stub_type, build_stub_object, locate_fn_flags): New. + (locate_ctor): Use locate_fn_flags. + (locate_copy, locate_dtor): Remove. + (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New. + (process_subob_fn, synthesized_method_walk): New. + (maybe_explain_implicit_delete): New. + (implicitly_declare_fn): Use synthesized_method_walk, + type_has_trivial_fn, and type_set_nontrivial_flag. + (defaulted_late_check): Set DECL_DELETED_FN. + (defaultable_fn_check): Handle sfk_move_assignment. + (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare + implicitly deleted move ctor/op=. + * search.c (lookup_fnfields_1): Handle sfk_move_assignment. + (lookup_fnfields_slot): New. + * semantics.c (omp_clause_info_fndecl): Remove. + (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor, + get_copy_assign, trivial_fn_p. + (trait_expr_value): Adjust call to locate_ctor. + * tree.c (special_function_p): Handle sfk_move_assignment. + + * class.c (type_has_virtual_destructor): New. + * cp-tree.h: Declare it. + * semantics.c (trait_expr_value): Use it. + + * call.c (build_over_call): Only give warnings with tf_warning. + + * name-lookup.c (pop_scope): Handle NULL_TREE. + + * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN. + (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN. + (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR. + (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR. + (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN. + (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR. + (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN. + (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR. + (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN. + (sfk_assignment_operator): Rename to sfk_copy_assignment. + * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust. + * search.c, semantics.c, tree.c: Adjust. + + * pt.c (dependent_scope_ref_p): Remove. + (value_dependent_expression_p): Don't call it. + (type_dependent_expression_p): Here either. + * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id + if the scope isn't dependent. + + * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want + a reference. + + PR c++/44587 + * pt.c (has_value_dependent_address): New. + (value_dependent_expression_p): Check it. + (convert_nontype_argument): Likewise. Call decay_conversion before + folding if we want a pointer. + * semantics.c (finish_id_expression): Don't add SCOPE_REF if the + scope is the current instantiation. + +2010-06-28 Jakub Jelinek + + PR c++/44682 + * class.c (build_base_path): If want_pointer, call mark_rvalue_use + on expr. + +2010-06-28 Steven Bosscher + + * init.c: Do not include except.h. + * decl.c: Likewise. + * expr.c: Likewise. + * cp-lang.c: Likewise. + * pt.c: Likewise. + * semantics.c: Likewise. + * decl2.c: Likewise. + * except.c: Likewise. + (init_exception_processing): Do not set the removed + lang_protect_cleanup_actions here. + (cp_protect_cleanup_actions): Make non-static and remove prototype. + (doing_eh): New, moved from except.c but removed the do_warning flag. + (expand_start_catch_block): Update doing_eh call. + (expand_end_catch_block): Likewise. + (build_throw): Likewise. + * cp-tree.h: Prototype cp_protect_cleanup_actions. + * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to + cp_protect_cleanup_actions. + * Make-lang.in: Update dependencies. + +2010-06-26 Jason Merrill + + * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any + constructor called with a single argument that takes a reference + to the constructor's class. + (BAD_CONVERSION_RANK): New. + (compare_ics): Use it to compare bad ICSes. + 2010-06-25 Joseph Myers * lang-specs.h: Remove +e handling.