cp/ChangeLog
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wnull-conversion-1.C
blob511f091f2cfe3e799ab1b29d792a1174e098dc1b
1 // { dg-do compile }
2 // { dg-options "-Wconversion-null" }
4 #include <stddef.h>
6 void func1(int* ptr);
8 void func2() {
9   int* t = false;             // { dg-warning "converting 'false' to pointer" }
10   int* p;
11   p = false;                  // { dg-warning "converting 'false' to pointer" }
12   int* r = sizeof(char) / 2;
13   func1(false);               // { dg-warning "converting 'false' to pointer" }
14   int i = NULL;               // { dg-warning "converting to non-pointer" }