+2018-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85553
+ * init.c (build_zero_init_1): For zero initialization of
+ NULLPTR_TYPE_P type use build_int_cst directly.
+
2018-04-27 David Malcolm <dmalcolm@redhat.com>
PR c++/85515
items with static storage duration that are not otherwise
initialized are initialized to zero. */
;
- else if (TYPE_PTR_OR_PTRMEM_P (type) || NULLPTR_TYPE_P (type))
+ else if (TYPE_PTR_OR_PTRMEM_P (type))
init = fold (convert (type, nullptr_node));
+ else if (NULLPTR_TYPE_P (type))
+ init = build_int_cst (type, 0);
else if (SCALAR_TYPE_P (type))
init = fold (convert (type, integer_zero_node));
else if (RECORD_OR_UNION_CODE_P (TREE_CODE (type)))
+2018-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/85553
+ * g++.dg/cpp0x/Wzero-as-null-pointer-constant-3.C: Add dg-bogus
+ directive.
+ * g++.dg/cpp0x/constexpr-85553.C: New test.
+
2018-04-27 David Malcolm <dmalcolm@redhat.com>
PR c++/85515