30 int i = NULL; // { dg-warning "" } converting NULL to non-pointer type
31 float z = NULL; // { dg-warning "" } converting NULL to non-pointer type
34 i != NULL; // { dg-warning "" } NULL used in arithmetic
35 NULL != z; // { dg-warning "" } NULL used in arithmetic
36 k != NULL; // No warning: decay conversion
37 NULL != a; // Likewise.
38 -NULL; // { dg-warning "" } converting NULL to non-pointer type
39 +NULL; // { dg-warning "" } converting NULL to non-pointer type
40 ~NULL; // { dg-warning "" } converting NULL to non-pointer type
41 a[NULL] = 3; // { dg-warning "" } converting NULL to non-pointer-type
42 i = NULL; // { dg-warning "" } converting NULL to non-pointer type
43 z = NULL; // { dg-warning "" } converting NULL to non-pointer type
44 k(NULL); // { dg-warning "" } converting NULL to int
45 g(NULL); // { dg-warning "" } converting NULL to int
46 h<NULL>(); // No warning: NULL bound to integer template parameter
47 l(NULL); // No warning: NULL is used to implicitly instantiate the template
48 NULL && NULL; // No warning: converting NULL to bool is OK
51 void warn_for___null()
53 int i = __null; // { dg-warning "" } converting __null to non-pointer type
54 float z = __null; // { dg-warning "" } converting __null to non-pointer type
57 i != __null; // { dg-warning "" } __null used in arithmetic
58 __null != z; // { dg-warning "" } __null used in arithmetic
59 k != __null; // No warning: decay conversion
60 __null != a; // Likewise.
61 -__null; // { dg-warning "" } converting __null to non-pointer type
62 +__null; // { dg-warning "" } converting __null to non-pointer type
63 ~__null; // { dg-warning "" } converting __null to non-pointer type
64 a[__null] = 3; // { dg-warning "" } converting __null to non-pointer-type
65 i = __null; // { dg-warning "" } converting __null to non-pointer type
66 z = __null; // { dg-warning "" } converting __null to non-pointer type
67 k(__null); // { dg-warning "" } converting __null to int
68 g(__null); // { dg-warning "" } converting __null to int
69 h<__null>(); // No warning: __null bound to integer template parameter
70 l(__null); // No warning: __null is used to implicitly instantiate the template
71 __null && __null; // No warning: converting NULL to bool is OK