Further P0135 refinement.
[gcc.git] / gcc / cp / ChangeLog
index 7bd7db64f4efc0751e07180fb93c9fee845bdee8..0bd0457f01a7c283cb57f93fe453c3319af83f95 100644 (file)
@@ -1,3 +1,97 @@
+2016-10-07  Jason Merrill  <jason@redhat.com>
+
+       Further P0135 refinement.
+       * call.c (build_user_type_conversion_1): Consider conversions from
+       a single element in an initializer-list.
+       (build_temp): Undo early_elide_copy change.
+       (build_over_call): Check that we don't try to copy a TARGET_EXPR
+       in C++17 mode.  Set user_conv_p here.
+       (convert_like_real): Not here.
+       (check_self_delegation): Split out from...
+       (build_special_member_call): ...here.  Handle C++17 copy elision.
+       * cvt.c (early_elide_copy): Remove.
+       (ocp_convert): Undo early_elide_copy change.
+       * except.c (build_throw): Likewise.
+       * init.c (expand_default_init): Likewise.
+       * typeck.c (cp_build_modify_expr): Likewise.
+
+2016-10-07  Nathan Sidwell  <nathan@acm.org>
+
+       PR c++/64433
+       DR1658, DR1611
+       * init.c (emit_mem_initializers): Don't construct vbases of
+       abstract classes.
+       (push_base_cleanups): Don't push vbase cleanups for abstract class
+       when in C++14 mode.
+       * method.c (synthethesized_method_walk): Don't walk vbases of
+       abstract classes when in C++14 mode.
+
+2016-10-07  Jakub Jelinek  <jakub@redhat.com>
+
+       Implement LWG2296 helper intrinsic
+       * parser.c (cp_parser_postfix_expression): Handle RID_ADDRESSOF.
+       * cp-objcp-common.c (cp_common_init_ts): Handle ADDRESSOF_EXPR.
+       * constexpr.c (potential_constant_expression_1): Likewise.
+       * error.c (dump_expr): Likewise.
+       * typeck.c (cp_build_addressof): New function.
+       * cp-tree.h (cp_build_addressof): Declare.
+       * cxx-pretty-print.h (pp_cxx_addressof_expression): Declare.
+       * cp-tree.def (ADDRESSOF_EXPR): New tree code.
+       * cxx-pretty-print.c (cxx_pretty_printer::primary_expression): Handle
+       ADDRESSOF_EXPR.  Add __builtin_addressof and
+       __has_unique_object_representations into syntax in function comment.
+       (pp_cxx_addressof_expression): New function.
+       * pt.c (tsubst_copy_and_build): Handle ADDRESSOF_EXPR.
+
+2016-10-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>
+
+       PR c++/77700
+       * parser.c (cp_parser_base_specifier): Fix a warning.
+
+2016-10-07  Bernd Schmidt  <bschmidt@redhat.com>
+
+       PR c++/69733
+       * decl.c (grokdeclarator): Try to find the correct location for an
+       ignored qualifier.
+
+2016-10-07  Martin Liska  <mliska@suse.cz>
+
+       * lambda.c (maybe_add_lambda_conv_op): Set default value.
+
+2016-10-06  Jason Merrill  <jason@redhat.com>
+
+       * call.c (build_temp, convert_like_real): Don't re-copy
+       TARGET_EXPR.  Handle packed fields.
+       (build_x_va_arg): Wrap it in a TARGET_EXPR.
+       (build_over_call): Add sanity check.
+       * cvt.c (early_elide_copy): New.
+       (ocp_convert): Use it.
+       * except.c (build_throw): Use it.
+       * init.c (get_nsdmi): Put back the TARGET_EXPR.
+       (expand_default_init): Call early_elide_copy.
+       * typeck.c (cp_build_modify_expr): Call early_elide_copy.
+
+2016-10-06  Jakub Jelinek  <jakub@redhat.com>
+
+       Implement P0258R2 - helper for C++17
+       std::has_unique_object_representations trait
+       * cp-tree.h (enum cp_trait_kind): Add
+       CPTK_HAS_UNIQUE_OBJ_REPRESENTATIONS.
+       (struct lang_type_class): Add unique_obj_representations
+       and unique_obj_representations_set bitfields.
+       (CLASSTYPE_UNIQUE_OBJ_REPRESENTATIONS,
+       CLASSTYPE_UNIQUE_OBJ_REPRESENTATIONS_SET): Define.
+       (type_has_unique_obj_representations): Declare.
+       * parser.c (cp_parser_primary_expression): Handle
+       RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
+       (cp_parser_trait_expr): Likewise.  Formatting fix.
+       * semantics.c (trait_expr_value, finish_trait_expr): Handle
+       CPTK_HAS_UNIQUE_OBJ_REPRESENTATIONS.
+       * tree.c (type_has_unique_obj_representations): New function.
+       (record_has_unique_obj_representations): New function.
+       * cxx-pretty-print.c (pp_cxx_trait_expression): Handle
+       CPTK_HAS_UNIQUE_OBJ_REPRESENTATIONS.
+
 2016-10-05  Jason Merrill  <jason@redhat.com>
 
        Implement P0135R1, Guaranteed copy elision.