Core 903
* call.c (null_ptr_cst_p): Check char_type_p.
From-SVN: r240329
+2016-09-21 Jason Merrill <jason@redhat.com>
+
+ Core 903
+ * call.c (null_ptr_cst_p): Check char_type_p.
+
2016-09-21 Jakub Jelinek <jakub@redhat.com>
PR c++/77651
{
/* Core issue 903 says only literal 0 is a null pointer constant. */
if (TREE_CODE (type) == INTEGER_TYPE
+ && !char_type_p (type)
&& TREE_CODE (t) == INTEGER_CST
&& integer_zerop (t)
&& !TREE_OVERFLOW (t))
--- /dev/null
+// { dg-do compile { target c++11 } }
+
+void *p = '\0'; // { dg-error "invalid conversion" }