summaryrefslogtreecommitdiff
path: root/warnings.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-02-04 11:10:52 +0000
committerNicholas Clark <nick@ccl4.org>2006-02-04 11:10:52 +0000
commit78db725db76314f0edb7f2ab8770841118d8ad2e (patch)
treee61ef30d8a076f918b29c97aaeb79e59a640c76a /warnings.h
parente8121b0d0efcf7b0d99f3775e307861be34d07a2 (diff)
downloadperl-78db725db76314f0edb7f2ab8770841118d8ad2e.tar.gz
warnings.h does some evil(*) pointer arithmetic on (SV *)0, so a
simple replace of Nullsv with NULL turns out to be a bad idea. * Technically undefined behaviour, I believe. p4raw-id: //depot/perl@27078
Diffstat (limited to 'warnings.h')
-rw-r--r--warnings.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/warnings.h b/warnings.h
index 1157cb2e96..7ef3c0495c 100644
--- a/warnings.h
+++ b/warnings.h
@@ -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)