Index: testsuite/g++.dg/cpp0x/pr51313.C
===================================================================
--- testsuite/g++.dg/cpp0x/pr51313.C	(revision 0)
+++ testsuite/g++.dg/cpp0x/pr51313.C	(revision 0)
@@ -0,0 +1,18 @@
+// PR c++/51313
+// { dg-options "-std=c++0x" }
+
+class ostream;
+
+extern "C" {
+  extern int isdigit (int);
+}
+
+ostream&
+operator<<(ostream&, const unsigned char*);
+
+extern ostream cout;
+
+int main()
+{
+  cout << isdigit(0);
+}
Index: cp/call.c
===================================================================
--- cp/call.c	(revision 181932)
+++ cp/call.c	(working copy)
@@ -549,10 +549,8 @@ null_ptr_cst_p (tree t)
     {
       /* Core issue 903 says only literal 0 is a null pointer constant.  */
       if (cxx_dialect < cxx0x)
-	{
-	  t = integral_constant_value (t);
-	  STRIP_NOPS (t);
-	}
+	t = integral_constant_value (t);
+      STRIP_NOPS (t);
       if (integer_zerop (t) && !TREE_OVERFLOW (t))
 	return true;
     }
