===================================================================
@@ -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);
+}
===================================================================
@@ -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;
}