PR c++/88337 - P1327R1: Allow polymorphic typeid in constexpr.
[gcc.git] / gcc / cp / ChangeLog
index 3742e71fe3a7416bfdb927b40c184d1c042db8fb..444b339fe57618acd5d94127a329b7dfce496a8c 100644 (file)
@@ -1,3 +1,187 @@
+2019-11-22  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/88337 - P1327R1: Allow polymorphic typeid in constexpr.
+       * constexpr.c (potential_constant_expression_1): Allow a typeid
+       expression whose operand is of polymorphic type in constexpr in
+       C++20.
+       * rtti.c (build_typeid): Remove obsolete FIXME comment.
+
+2019-11-22  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/90677
+       * cp-objcp-common.c (identifier_global_tag): Define.
+
+       PR c++/92458
+       * init.c (nsdmi_inst): Change type to
+       decl_tree_cache_map * from tree_cache_map *.
+       * constraint.cc (decl_constraints): Likewise.
+       * decl.c (get_tuple_decomp_init): Likewise.
+       * pt.c (defarg_inst, explicit_specifier_map): Likewise.
+       (tsubst_default_argument, store_explicit_specifier): Use
+       decl_tree_cache_map::create_ggc rather than
+       tree_cache_map::create_ggc.
+       * cp-objcp-common.c (debug_type_map): Change type to
+       type_tree_cache_map * from tree_cache_map *.
+
+2019-11-21  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/92450 - ICE with invalid nested name specifier.
+       * parser.c (cp_parser_member_declaration): Don't attempt to print
+       erroneous bit-field diagnostic if grokdeclarator returns
+       error_mark_node.
+
+2019-11-21  Jakub Jelinek  <jakub@redhat.com>
+           Jason Merrill  <jason@redhat.com>
+
+       PR c++/90842
+       * parser.c (cp_parser_decl_specifier_seq): For concept or typedef
+       break early if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR.
+       For type specifiers, set CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS
+       if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR is set.
+
+2019-11-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * typeck2.c (build_x_arrow): Early return if decay_conversion
+       returns error_mark_node.
+
+2019-11-20  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/90767
+       * call.c (complain_about_no_candidates_for_method_call): If
+       conv->from is not a type, pass to complain_about_bad_argument
+       lvalue_type of conv->from.
+
+2019-11-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * cvt.c (ocp_convert): Use additional warning sentinel.
+
+2019-11-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/92414
+       * constexpr.c (cxx_eval_outermost_constant_expr): If DECL_INITIAL
+       on object is erroneous, return t without trying to evaluate
+       a constexpr dtor.
+
+2019-11-12  Jason Merrill  <jason@redhat.com>
+
+       * call.c (same_fn_or_template): Change to cand_parms_match.
+       (joust): Adjust.
+       (print_z_candidate): Mark rewritten/reversed candidates.
+       (build_new_op_1): Warn about recursive call with reversed arguments.
+
+2019-11-15  Andrew Sutton  <asutton@lock3software.com>
+
+       PR c++/89913
+       * pt.c (get_underlying_template): Exit loop if the original type
+       of the alias is null.
+
+2019-11-19  Andrew Sutton  <asutton@lock3software.com>
+
+       PR c++/92078
+       * pt.c (maybe_new_partial_specialization): Apply access to newly
+       created partial specializations. Update comment style.
+
+2019-11-19  Andrew Sutton  <asutton@lock3software.com>
+
+       PR c++/92078
+       * pt.c (maybe_new_partial_specialization): Apply access to newly
+       created partial specializations. Update comment style.
+
+2019-11-19  Andrew Sutton  <asutton@lock3software.com>
+
+       PR c++/92403
+       Suppress diagnostics substituting into a requires-expression.
+       * pt.c (tsubst_copy_and_build): Perform the first substitution without
+       diagnostics and a second only if tsubst_requries_expr returns an error.
+
+2019-11-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/92504
+       * semantics.c (handle_omp_for_class_iterator): Don't call
+       cp_fully_fold on cond.
+
+2019-11-18  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * typeck.c (cp_build_addr_expr_1): Use cp_expr_loc_or_input_loc
+       in three places.
+       (cxx_sizeof_expr): Use it in one additional place.
+       (cxx_alignof_expr): Likewise.
+       (lvalue_or_else): Likewise.
+
+2019-11-18  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/91962 - ICE with reference binding and qualification conversion.
+       * call.c (convert_like_real) <case ck_ref_bind>: Check need_temporary_p.
+
+2019-11-17  Jakub Jelinek  <jakub@redhat.com>
+
+       * method.c (lookup_comparison_result): Use %qD instead of %<%T::%D%>
+       to print the decl.
+       (lookup_comparison_category): Use %qD instead of %<std::%D%> to print
+       the decl.
+
+2019-11-15  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * typeck.c (cp_truthvalue_conversion): Add tsubst_flags_t parameter
+       and use it in calls; also pass the location_t of the expression to
+       cp_build_binary_op and c_common_truthvalue_conversion.
+       * rtti.c (build_dynamic_cast_1): Adjust call.
+       * cvt.c (ocp_convert): Likewise.
+       * cp-gimplify.c (cp_fold): Likewise.
+       * cp-tree.h (cp_truthvalue_conversion): Update declaration.
+
+2019-11-14  Jason Merrill  <jason@redhat.com>
+
+       Implement P1816R0, class template argument deduction for aggregates.
+       * pt.c (maybe_aggr_guide, collect_ctor_idx_types): New.
+       (is_spec_or_derived): Split out from do_class_deduction.
+       (build_deduction_guide): Handle aggregate guide.
+       * class.c (finish_struct): Set CLASSTYPE_NON_AGGREGATE in a
+       template.
+       * cp-tree.h (CP_AGGREGATE_TYPE_P): An incomplete class is not an
+       aggregate.
+
+2019-11-14  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * call.c (build_conditional_expr_1): Use truth_type_for instead
+       of build_same_sized_truth_vector_type.
+       * typeck.c (build_vec_cmp): Likewise.
+
+2019-11-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * parser.c (cp_parser_omp_context_selector): Don't require score
+       argument to fit into shwi, just to be INTEGER_CST.  Diagnose
+       negative score.
+       * pt.c (tsubst_attribute): Likewise.
+
+       * parser.c (cp_parser_omp_context_selector): Rename
+       CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
+       Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
+       identifier in that.  For CTX_PROPERTY_NAME_LIST, allow identifiers
+       and string literals.
+       * pt.c (tsubst_attribute): Fix up STRING_CST handling if allow_string.
+
+2019-11-13  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/89070 - bogus [[nodiscard]] warning in SFINAE.
+       * cvt.c (convert_to_void): Guard maybe_warn_nodiscard calls with
+       tf_warning.
+
+2019-11-13  Richard Sandiford  <richard.sandiford@arm.com>
+
+       PR c++/92206
+       * cp-tree.h (STF_STRIP_DEPENDENT): New constant.
+       * tree.c (strip_typedefs): Add STF_STRIP_DEPENDENT to the flags
+       when calling strip_typedefs recursively on a DECL_ORIGINAL_TYPE.
+       Don't apply the fix for DR1558 in that case; allow aliases with
+       dependent template parameters to be stripped instead.
+
+2019-11-12  Nathan Sidwell  <nathan@acm.org>
+
+       * name-lookup.c (lookup_using_decl): New function, merged from ...
+       (do_class_using_decl): ... here.  Call it.  And ...
+       (finish_nonmember_using_decl): ... here.  Call it.
+
 2019-11-12  Martin Liska  <mliska@suse.cz>
 
        * name-lookup.c: Do not include params.h.
@@ -5,9 +189,9 @@
 
 2019-11-12  Martin Liska  <mliska@suse.cz>
 
-       * name-lookup.c (namespace_hints::namespace_hints): Replace old parameter syntax
-       with the new one, include opts.h if needed.  Use SET_OPTION_IF_UNSET
-       macro.
+       * name-lookup.c (namespace_hints::namespace_hints): Replace old
+       parameter syntax with the new one, include opts.h if needed.  Use
+       SET_OPTION_IF_UNSET macro.
        * typeck.c (comptypes): Likewise.
 
 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>