Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / cpp0x / nullptr06.C
blobc50bb9bc1132ac1965a4ac819a261d1a02352517
1 // { dg-do compile }
2 // { dg-options "-std=c++0x" }
4 // Test compare to pointer
6 #define assert_true(b) do { char c[2 * bool(b) - 1]; } while(0)
8 char* const cp1 = nullptr;
10 void fun()
12   assert_true(cp1 == nullptr);
13   decltype(nullptr) mynull = 0;
14   assert_true(cp1 == mynull);