Treat boolean vector elements as 0/-1 [PR115406]
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wzero-as-null-pointer-constant-7.C
blob571a4cf4c83f68ce2e0ea3147bafe34eab81dd0f
1 // { dg-options "-Wzero-as-null-pointer-constant" }
2 // { dg-do compile { target c++11 } }
4 #include <cstddef>
6 void test01()
8   char* x(NULL);
9   char* x2{NULL};
10   char* x3 = NULL;
11   char* x4(0); // { dg-warning "12: zero as null pointer" }
12   char* x5 = 0; // { dg-warning "14: zero as null pointer" }