This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
warnings.h does some evil(*) pointer arithmetic on (SV *)0, so a
[perl5.git] / warnings.h
index 1157cb2..7ef3c04 100644 (file)
@@ -18,8 +18,8 @@
 #define G_WARN_ALL_MASK                (G_WARN_ALL_ON|G_WARN_ALL_OFF)
 
 #define pWARN_STD              NULL
-#define pWARN_ALL              (NULL+1)        /* use warnings 'all' */
-#define pWARN_NONE             (NULL+2)        /* no  warnings 'all' */
+#define pWARN_ALL              (((SV*)0)+1)    /* use warnings 'all' */
+#define pWARN_NONE             (((SV*)0)+2)    /* no  warnings 'all' */
 
 #define specialWARN(x)         ((x) == pWARN_STD || (x) == pWARN_ALL ||        \
                                 (x) == pWARN_NONE)