summaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2017-07-31 14:43:24 +0200
committerMartin Jambor <mjambor@suse.cz>2017-07-31 14:43:24 +0200
commitb32f12dece884f1fa0f04c643a77105aff6ce8bc (patch)
treecdab5f10806561fc198f907299b0e55eb5701ef0 /gcc/cp/ChangeLog
parent166bec868d991fdf71f9a66f994e5977fcab4aa2 (diff)
parenta168a775e93ec31ae743ad282d8e60fa1c116891 (diff)
downloadgcc-b32f12dece884f1fa0f04c643a77105aff6ce8bc.tar.gz
Merge branch 'master' into gcngcn
Diffstat (limited to 'gcc/cp/ChangeLog')
-rw-r--r--gcc/cp/ChangeLog480
1 files changed, 480 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a06de8ba8c7..76d1de09c4d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,483 @@
+2017-07-31 Jan Hubicka <hubicka@ucw.cz>
+ Martin Liska <mliska@suse.cz>
+
+ * pt.c (tsubst_copy): Copy PREDICT_EXPR.
+ * semantics.c (finish_goto_stmt): Build gimple predict
+ stament.
+ * constexpr.c (potential_constant_expression_1): Handle
+ PREDICT_EXPR.
+
+2017-07-31 Martin Liska <mliska@suse.cz>
+
+ PR sanitize/81530
+ * cp-gimplify.c (cp_genericize): Guard condition with flag_sanitize_p
+ also with current_function_decl non-null equality.
+ * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Likewise.
+ * decl.c (compute_array_index_type): Likewise.
+ * init.c (finish_length_check): Likewise.
+ * typeck.c (cp_build_binary_op): Likewise.
+
+2017-07-29 Jakub Jelinek <jakub@redhat.com>
+
+ * cp-objcp-common.c (cp_decl_dwarf_attribute): Handle
+ DW_AT_export_symbols.
+ * name-lookup.c (emit_debug_info_using_namespace): Add IMPLICIT
+ argument, pass it through to the debug hook.
+ (finish_namespace_using_directive): Adjust
+ emit_debug_info_using_namespace caller.
+ (push_namespace): Likewise. Call it after setting
+ DECL_NAMESPACE_INLINE_P.
+ (cp_emit_debug_info_for_using): Pass false as new argument to
+ the imported_module_or_decl debug hook.
+
+2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * lex.c (copy_decl): Adjust.
+ (copy_type): Likewise.
+
+2017-07-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/71570
+ * lambda.c (add_capture): Early return if we cannot capture by
+ reference.
+
+2017-07-26 Jason Merrill <jason@redhat.com>
+
+ P0702R1 - List deduction of vector.
+ * pt.c (do_class_deduction): Special-case deduction from a single
+ element of related type.
+
+2017-07-26 Leonid Koppel <lkoppel@uwaterloo.ca>
+
+ PR c++/67054 - Inherited ctor with non-default-constructible members
+ * method.c (walk_field_subobs) Consider member initializers (NSDMIs)
+ when deducing an inheriting constructor.
+
+2017-07-21 Nathan Sidwell <nathan@acm.org>
+
+ * search.c (lookup_conversion_operator): Return overloads.
+ (lookup_fnfields_idx_nolazy): Absorb into ...
+ (lookup_fnfields_slot_nolaxy): ... here.
+ (lookup_fnfields_1): Absorb into ...
+ (lookup_fnfields_slot): ... here.
+
+ Remove special CDtor METHOD_VEC slots.
+ * cp-tree.h (CLASSTYPE_CONSTRUCTOR_SLOT,
+ CLASSTYPE_DESTRUCTOR_SLOT): Delete.
+ (CLASSTYPE_CONSTRUCTORS): Use lookup_fnfields_slot_nolazy.
+ (CLASSTYPE_DESTRUCTOR): Likewise.
+ * class (add_method): Don't use special cdtor slots.
+ * search.c (lookup_fnfields_idx_nolazy): Likewise.
+ (look_for_overrides_here): Use lookup_fnfields_slot.
+ * semantics (classtype_has_nothrow_assign_or_copy_p): Likewise.
+
+ * call.c (add_candidates): Move decls to initialization. Don't
+ use !!.
+
+2017-07-20 Nathan Sidwell <nathan@acm.org>
+
+ Remove TYPE_METHODS.
+ * class.c (maybe_warn_about_overly_private_class,
+ finish_struct_methods, one_inheriting_sig, count_fields,
+ add_fields_to_record_type, check_field_decls, check_methods,
+ clone_function_decl, set_method_tm_attributes,
+ finalize_literal_type_property, check_bases_and_members,
+ create_vtable_ptr, determine_key_method,
+ unreverse_member_declarations, finish_struct,
+ add_vcall_offset_vtbl_entries_1): Member fns are on TYPE_FIELDS.
+ * decl.c (fixup_anonymous_aggr): Likewise.
+ * decl2.c (reset_type_linkage_2): Likewise.
+ * method.c (after_nsdmi_defaulted_late_checks,
+ lazily_declare_fn): Likewise.
+ * optimize.c (maybe_thunk_body, maybe_clone_body): Likewise.
+ * pt.c (instantiate_class_template_1, tsubst_expr,
+ do_type_instantiation, instantiate_pending_templates): Likewise.
+ * search.c (lookup_field_1): Likewise.
+ * semantics.c (finish_member_declaration,
+ finish_omp_declare_simd_methods): Likewise.
+
+2017-07-19 Nathan Sidwell <nathan@acm.org>
+
+ * class.c (add_implicitly_declared_members): Use
+ classtype_has_move_assign_or_move_ctor_p.
+ (classtype_has_move_assign_or_move_ctor,
+ classtype_has_user_move_assign_or_move_ctor_p): Merge into ...
+ (classtype_has_move_assign_or_move_ctor_p): ... this new function.
+ * cp-tree.h (classtype_has_user_move_assign_or_move_ctor_p):
+ Replace with ...
+ (classtype_has_move_assign_or_move_ctor_p): ... this.
+ * method.c (maybe_explain_implicit_delete, lazily_declare_fn): Adjust.
+ * tree.c (type_has_nontrivial_copy_init): Adjust.
+
+ * cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS,
+ PACK_EXPANSION_EXTRA_ARGS): Use TYPE_{MIN,MAX}_VALUE_RAW.
+
+2017-07-18 Nathan Sidwell <nathan@acm.org>
+
+ * cp-array-notation.c (build_array_notation_ref): Use
+ TYPE_{MIN,MAX}_VALUE.
+
+ * class.c (classtype_has_move_assign_or_move_ctor): Declare.
+ (add_implicitly_declared_members): Use it.
+ (type_has_move_constructor, type_has_move_assign): Merge into ...
+ (classtype_has_move_assign_or_move_ctor): ... this new function.
+ * cp-tree.h (type_has_move_constructor, type_has_move_assign): Delete.
+
+2017-07-17 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for
+ friend outside class and obsolete auto as storage-class-specifier.
+
+2017-07-17 Nathan Sidwell <nathan@acm.org>
+
+ * class.c (maybe_warn_about_overly_private_class): Ignore public
+ copy ctors.
+
+ * class.c (type_has_user_declared_move_constructor,
+ type_has_user_declared_move_assign): Combine into ...
+ (classtype_has_user_move_assign_or_move_ctor_p): ... this new function.
+ * cp-tree.h (type_has_user_declared_move_constructor,
+ type_has_user_declared_move_assign): Combine into ...
+ (classtype_has_user_move_assign_or_move_ctor_p): ... this. Declare.
+ * method.c (maybe_explain_implicit_delete): Use it.
+ (lazily_declare_fn): Use it.
+ * tree.c (type_has_nontrivial_copy_init): Use it.
+
+ * semantics.c (classtype_has_nothrow_assign_or_copy_p): Clarify
+ semantics, simplify implementation.
+
+2017-07-16 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * parser.c (cp_parser_cast_expression): Use %q#T instead of %qT
+ in old-style cast diagnostic.
+ * typeck.c (maybe_warn_about_useless_cast): Use %q#T instead of %qT
+ in useless cast diagnostic.
+ * error.c (type_to_string): Remove enum special handling.
+
+2017-07-14 David Malcolm <dmalcolm@redhat.com>
+
+ * name-lookup.c (get_std_name_hint): Add '<' and '>' around
+ the header names.
+ (maybe_suggest_missing_header): Update for addition of '<' and '>'
+ to above. Provide a fix-it hint.
+ * pt.c: Include "gcc-rich-location.h"
+ (listify): Attempt to add fix-it hint for missing
+ #include <initializer_list>.
+ * rtti.c: Include "gcc-rich-location.h".
+ (typeid_ok_p): Attempt to add fix-it hint for missing
+ #include <typeinfo>.
+
+2017-07-12 Jason Merrill <jason@redhat.com>
+
+ P0512R0 - Deduction from an initializer list.
+ * pt.c (do_class_deduction): Do list deduction in two phases.
+
+2017-07-12 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (DECL_CONSTRUCTOR_P, DECL_MAYBE_IN_CHARGE_CONSTRUCTOR,
+ DECL_DESTRUCTOR_P, DECL_MAYBE_IN_CHARGE_DESTRCTOR): Look at
+ identifier flags.
+ * decl.c (grokfndecl): Set DECL_CXX_CONSTRUCTOR and
+ DECL_CXX_DESTRUCTOR explicitly.
+ * decl2.c (grokclassfn): Likewise.
+ * friend.c (do_friend): Likewise.
+ * method.c (make_thunk, make_alias_for,
+ implicitly_declare_fn): Likewise.
+
+2017-07-11 Jason Merrill <jason@redhat.com>
+
+ Core DR 393
+ * decl.c (grokparms): Downgrade error about array of unknown bound
+ to pedwarn and disable it for C++17.
+
+2017-07-11 Nathan Sidwell <nathan@acm.org>
+
+ * decl2.c (reset_type_linkage_2): Dont't change ctor name.
+
+2017-07-10 Martin Sebor <msebor@redhat.com>
+
+ * cp-tree.h (cp_operator_id, cp_assignment_operator_id): Document.
+
+2017-07-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/81204 - parse error with dependent template-name
+ * parser.c (cp_parser_lookup_name): Revert previous change.
+
+2017-07-06 David Malcolm <dmalcolm@redhat.com>
+
+ * cp-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): Define as
+ selftest::run_cp_tests.
+ (selftest::run_cp_tests): New function.
+ * cp-tree.h (selftest::run_cp_tests): New decl.
+
+2017-07-04 Jakub Jelinek <jakub@redhat.com>
+
+ * parser.c (cp_parser_decomposition_declaration): Replace
+ decomposition declaration with structured binding in diagnostics.
+ * decl.c (cp_finish_decomp): Likewise.
+ (grokdeclarator): Likewise.
+
+ PR c++/81258
+ * parser.c (cp_parser_decomposition_declaration): Diagnose invalid
+ forms of structured binding initializers.
+
+2017-07-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/65775
+ * decl.c (grokdeclarator): Move checks on function return type after
+ the splice_late_return_type call; if declspecs->locations[ds_type_spec]
+ is UNKNOWN_LOCATION fall back to input_location.
+
+2017-07-03 David Malcolm <dmalcolm@redhat.com>
+
+ * parser.c (enum required_token): Fix spelling of
+ RT_INTERATION to RT_ITERATION.
+ (cp_parser_iteration_statement): Likewise.
+ (cp_parser_required_error): Likewise.
+
+2017-06-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/81257 - ICE with invalid ::template.
+ PR c++/54769 - wrong lookup of dependent template-name.
+ * parser.c (cp_parser_template_name): Revert part of last change.
+
+2017-06-30 Nathan Sidwell <nathan@acm.org>
+
+ * config-lang.in (gtfiles): Add cp/lex.c.
+ * cp-tree.h (mangle_convop_name_for_type): Rename ...
+ (make_conv_op_name): ... here. Move to lex.
+ * lambda.c (maybe_add_lambda_conv_op): Update.
+ * parser.c (cp_parser_conversion_function_id): Update.
+ * pt.c (tsubst_decl, tsubst_baselink, tsubst_copy,
+ tsubst_copy_and_build): Update.
+ * semantics.c (apply_deduced_return_type): Update.
+ * mangle.c (conv_type_hasher, conv_type_names,
+ mangle_conv_op_name_for_type): Move to ...
+ * lex.c (conv_type_hasher, conv_type_names, make_convop_name):
+ ... here. Rename.
+
+2017-06-30 David Malcolm <dmalcolm@redhat.com>
+
+ PR c++/80014
+ * parser.c (cp_parser_postfix_expression): Construct a location
+ for typeid expressions.
+
+2017-06-30 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (lookup_fnfields_1, class_method_index_for_fn): Don't
+ declare.
+ (lookup_all_conversions): Declare.
+ * class.c (get_basefndecls): Use lookup_fnfields_slot.
+ * decl.c (register_dtor_fn): Use lookup_fnfields_slot.
+ * decl2.c (check_class_fn): Use lookup_fnfields_slot. Rework
+ diagnostics.
+ * pt.c (retrieve_specialization): Use lookup_fnfields_slot.
+ (check_explicit_specialization): Use lookup_fnfields_slot_nolazy,
+ lookup_all_conversions.
+ * search.c (lookup_fnfields_1): Make static.
+ (lookup_all_conversions): New.
+ (class_method_index_for_fn): Delete.
+ * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
+ lookup_fnfields_slot.
+
+ * call.c (build_new_method_call_1): Use constructo_name to get
+ ctor name. Move argument processing earlier to merge cdtor
+ handling blocks.
+ * decl.c (grokfndecl): Cdtors have special names.
+ * method.c (implicitly_declare_fn): Likewise. Simplify flag setting.
+ * pt.c (check_explicit_specialization): Cdtor name is already
+ special.
+ * search.c (class_method_index_for_fn): Likewise.
+
+ PR c++/81229
+ * name-lookup.c (do_pushdecl): Reset IDENTIFIER_TYPE when finding
+ a matching TYPE_DECL.
+
+2017-06-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * class.c (add_method): Change pair of errors to error + inform.
+ (handle_using_decl): Likewise.
+
+2017-06-29 Jason Merrill <jason@redhat.com>
+
+ * constexpr.c, error.c, tree.c: Remove WITH_CLEANUP_EXPR handling.
+
+ PR c++/81180 - ICE with C++17 deduction of member class template.
+ * pt.c (build_deduction_guide): Correct member template handling.
+
+ PR c++/81188 - matching decltype of member function call.
+ * tree.c (cp_tree_equal): Remove COMPONENT_REF special case.
+
+2017-06-29 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/81247
+ * parser.c (cp_parser_namespace_definition): Immediately close the
+ namespace if there's no open-brace.
+ * name-lookup.c (do_pushdecl): Reset OLD when pushing into new
+ namespace.
+
+2017-06-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/81164 - ICE with invalid inherited constructor.
+ * search.c (binfo_direct_p): New.
+ * name-lookup.c (do_class_using_decl): Use it.
+
+2017-06-29 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (THIS_NAME, IN_CHARGE_NAME, VTBL_PTR_TYPE,
+ VTABLE_DELTA_NAME, VTABLE_PFN_NAME): Delete.
+ * decl.c (initialize_predefined_identifiers): Name cdtor special
+ names consistently. Use literals for above deleted defines.
+ (cxx_init_decl_processing): Use literal for vtbl_ptr_type name,
+
+ * lex.c (maybe_add_lang_type_raw): Exit early, rather than use a
+ flag.
+
+ * call.c (check_dtor_name): Use constructor_name for enums too.
+ (build_new_method_call_1): Use constructor_name for cdtors and
+ show ~ for dtor.
+ * class.c (build_self_reference): Use TYPE_NAME to get name of
+ self reference.
+ * name-lookup (constructor_name): Use DECL_NAME directly.
+ (constructor_name_p): Reimplement.
+ (push_class_level_binding_1): Use TYPE_NAME directly.
+
+ * class.c (finish_struct): Use OVL_P.
+ (get_vfield_name): Measure constructor_name length.
+ * cp-tree.h (SET_CLASS_TYPE_P): Add RECORD_OR_UNION_CHECK.
+ (NON_UNION_CLASS_TYPE_P): Check RECORD_TYPE up front.
+ * cxx-pretty-print.c (is_destructor_name): Delete.
+ (pp_cxx_unqualified_id): Remove bogus destructor name checking.
+ * decl.c (grokfndecl): Move cheap checks first when looking for
+ implicit extern cness.
+
+ * parser.c (cp_parser_direct_declarator): Reorder if to avoid
+ indentation. Remove unnecessary assignment of constructor name.
+
+ Whitespace cleanups.
+ * call.c (name_as_c_string): Move CONST_CAST to return.
+ (build_new_method_call_1): Remove unneeded bracing.
+ * class.c (include_empty_classes): Unbreak line.
+ * constraint.cc (tsubst_check_constraint): Add space.
+ * cp-tree.h (lang_decl_ns): Add comment.
+ (PTRMEM_CST_MEMBER): Break line.
+ * decl.c (grokfndecl): Add blank lines. Unbreak some others.
+ (grokdeclarator): Remove lines, move declaration to first use.
+ * decl2.c (decl_needed_p): Fix indentation.
+ (c_parse_final_cleanups): Remove blank line.
+ * method.c (implicitly_declare_fn): Move declaration to first use.
+ * search.c (current_scope): Add blank lines.
+
+2017-06-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/72764 - ICE with invalid template typename.
+ * decl.c (build_typename_type): No longer static.
+ * tree.c (strip_typedefs): Use it instead of make_typename_type.
+
+ PR c++/69300 - ICE with self-referential noexcept
+ * pt.c (maybe_instantiate_noexcept): Check for recursion.
+
+ PR c++/61022 - error with variadic template template parm
+ * pt.c (convert_template_argument): Keep the TYPE_PACK_EXPANSION.
+
+ PR c++/72801 - ICE with variadic partial specialization
+ * pt.c (unify_pack_expansion): Use PACK_EXPANSION_EXTRA_ARGS.
+
+ PR c++/55639 - partial specialization with ::template
+ * parser.c (cp_parser_class_head): Handle ::template.
+
+ PR c++/45976 - error with ::template in declarator.
+ * pt.c (resolve_typename_type): Fix TEMPLATE_ID_EXPR handling.
+
+ PR c++/54769 - wrong lookup of dependent template-name.
+ * parser.c (cp_parser_template_name): Handle dependent object type.
+ (cp_parser_nested_name_specifier_opt): Make template_keyword_p a
+ parameter.
+ (cp_parser_id_expression): Pass it.
+ (cp_parser_diagnose_invalid_type_name): Handle TEMPLATE_ID_EXPR.
+
+ * parser.c (cp_parser_template_id): Use the range location on the
+ TEMPLATE_ID_EXPR.
+
+ PR c++/81204 - parse error with dependent template-name
+ * parser.c (cp_parser_lookup_name): Disqualify function templates
+ after lookup.
+
+2017-06-27 Nathan Sidwell <nathan@acm.org>
+
+ * pt.c (tsubst_decl <FUNCTION_DECL>): Move var decls to
+ initialization point. Don't unnecessarily check for ctor name.
+
+ * cp-tree.h (CLASSTYPE_DESTRUCTORS): Rename to ...
+ (CLASSTYPE_DESTRUCTOR): ... this.
+ * class.c (accessible_nvdtor_p,
+ maybe_warn_about_overly_private_class,
+ add_implicitly_declared_members,
+ clone_constructors_and_destructors, type_has_virtual_destructor):
+ Adjust for CLASSTYPE_DESTRUCTOR.
+ (deduce_noexcept_on_destructors): Absorb into ...
+ (check_bases_and_members): ... here.
+ * except.c (dtor_nothrow): Adjust for CLASSTYPE_DESTRUCTOR.
+ * init.c (build_delete): Likewise.
+ * parser.c (cp_parser_lookup_name): Likewise.
+ * pt.c (check_explicit_specialization): Likewise.
+ * rtti.c (emit_support_tinfos): Likewise.
+ * search.c (lookup_fnfields_idx_nolazy): Likewise.
+
+ Kill IDENTIFIER_TEMPLATE.
+ * cp-tree.h (lang_identifier): Remove class_template_info field.
+ (IDENTIFIER_TEMPLATE): Delete.
+ * name-lookup.c (constructor_name_full): Subsume into ...
+ (constructor_name): ... here. Don't check IDENTIFIER_TEMPLATE.
+ (constructor_name_p): Likewise.
+ * mangle.c (write_source_name): Likewise.
+ * ptree.c (cxx_print_identifier): Likewise.
+
+2017-06-27 Marek Polacek <polacek@redhat.com>
+
+ PR bootstrap/81216
+ * parser.c (cp_parser_already_scoped_statement): Initialize
+ LOC_AFTER_LABELS.
+
+2017-06-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/81215 - deduction failure with variadic TTP.
+ * pt.c (unify_bound_ttp_args): Restore old logic for C++14 and down.
+
+2017-06-26 Martin Sebor <msebor@redhat.com>
+
+ PR c++/81169
+ * call.c (maybe_warn_class_memaccess): Preserve explicit conversions
+ to detect casting away cv-qualifiers.
+
+2017-06-26 Nathan Sidwell <nathan@acm.org>
+
+ * cp-tree.h (lang_decl_fn): Remove assignment_operator_p field.
+ (DECL_COMPLETE_CONSTRUCTOR_P): Directly compare
+ identifier.
+ (DECL_BASE_CONSTRUCTOR_P, DECL_COMPLETE_DESTRUCTOR_P,
+ DECL_BASE_DESTRUCTOR_P, DECL_DELETING_DESTRUCTOR_P): Likewise.
+ (DECL_ASSIGNMENT_OPERATOR_P): Use IDENTIFIER_ASSIGN_OP_P.
+ * decl.c (grok_op_properties): Adjust identifier checking.
+ * init.c (expand_default_init): Adjust identifier descision.
+ * method.c (implicitly_declare_fn): Don't use
+ DECL_ASSIGNMENT_OPERATOR_P.
+ * search.c (lookup_fnfields_1): Use IDENTIFIER_CTOR_P,
+ IDENTIFIER_DTOR_P.
+ * call.c (in_charge_arg_for_name): Reimplement.
+ (build_special_member_call): Use IDENTIFIER_CDTOR_P,
+ IDENTIFIER_DTOR_P.
+
+2017-06-26 Marek Polacek <polacek@redhat.com>
+
+ PR c/80116
+ * parser.c (cp_parser_statement): Add a default argument. Save the
+ location of the expression-statement after labels have been parsed.
+ (cp_parser_implicitly_scoped_statement): Set the location of the
+ body of the conditional after parsing all the labels. Call
+ warn_for_multistatement_macros.
+ (cp_parser_already_scoped_statement): Likewise.
+
2017-06-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/62315