OSDN Git Service

Add support for C++0x nullptr.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / nullptr06.C
1 // { dg-do compile }
2 // { dg-options "-std=c++0x" }
3
4 // Test compare to pointer
5
6 #define assert_true(b) do { char c[2 * bool(b) - 1]; } while(0)
7
8 char* const cp1 = nullptr;
9
10 void fun()
11 {
12   assert_true(cp1 == nullptr);
13 }