1 // PR c++/24745 : warnings for NULL constant.
3 // { dg-options "-Wpointer-arith -Wconversion " }
9 if (NULL == 1) return -1; // { dg-warning "NULL used in arithmetic" }
10 if (NULL > NULL) return -1; // { dg-warning "NULL used in arithmetic" }
11 if (NULL < NULL) return -1; // { dg-warning "NULL used in arithmetic" }
12 if (NULL >= 0) return -1; // { dg-warning "NULL used in arithmetic" }
13 if (NULL <= 0) return -1; // { dg-warning "NULL used in arithmetic" }
21 if (!NULL == 1) return -1;
22 if (NULL || NULL) return -1;
23 if (!NULL && NULL) return -1;
24 if (NULL == NULL) return -1;
25 if (NULL != NULL) return -1;
26 if (NULL == 0) return -1;
27 if (NULL != 0) return -1;