Add support for C++0x nullptr.
[official-gcc/constexpr.git] / gcc / testsuite / g++.dg / cpp0x / nullptr20.C
blobb7457ca124a911ead02bf4b340c4794c8a4e64f6
1 // { dg-do run }
2 // { dg-options "-std=c++0x" }
4 // Test passing to ellipisis
6 #include <cstdio>
7 #include <cstring>
9 int main()
11   char buf1[64];
12   char buf2[64];
14   std::snprintf(buf1, sizeof(buf1), "%p", (void*)0);
15   std::snprintf(buf2, sizeof(buf2), "%p", nullptr);
16   return std::strcmp(buf1, buf2) != 0;