/cp
2018-04-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70808
* init.c (build_zero_init_1): Handle NULLPTR_TYPE_P being true of
the type like TYPE_PTR_OR_PTRMEM_P.
/testsuite
2018-04-10 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70808
* g++.dg/warn/Wzero-as-null-pointer-constant-7.C: New.
From-SVN: r259303
+2018-04-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/70808
+ * init.c (build_zero_init_1): Handle NULLPTR_TYPE_P being true of
+ the type like TYPE_PTR_OR_PTRMEM_P.
+
2018-04-10 Jason Merrill <jason@redhat.com>
PR debug/65821 - wrong location for main().
items with static storage duration that are not otherwise
initialized are initialized to zero. */
;
- else if (TYPE_PTR_OR_PTRMEM_P (type))
+ else if (TYPE_PTR_OR_PTRMEM_P (type) || NULLPTR_TYPE_P (type))
init = fold (convert (type, nullptr_node));
else if (SCALAR_TYPE_P (type))
init = fold (convert (type, integer_zero_node));
+2018-04-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/70808
+ * g++.dg/warn/Wzero-as-null-pointer-constant-7.C: New.
+
2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
* gcc.target/powerpc/dfmode_off.c: Add -fno-asynchronous-unwind-tables.
--- /dev/null
+// PR c++/70808
+// { dg-options "-Wzero-as-null-pointer-constant" }
+
+int* no_warn = {};
+decltype( nullptr ) warn = {};