This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #112786] Fix build under clang++
[perl5.git] / warnings.h
index 27e240e..39ebe6a 100644 (file)
@@ -1,8 +1,8 @@
 /* -*- buffer-read-only: t -*-
    !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
-   This file is built by warnings.pl
+   This file is built by regen/warnings.pl.
    Any changes made here will be lost!
-*/
+ */
 
 
 #define Off(x)                 ((x) / 8)
 #define G_WARN_ONCE            8       /* set if 'once' ever enabled */
 #define G_WARN_ALL_MASK                (G_WARN_ALL_ON|G_WARN_ALL_OFF)
 
-#define pWARN_STD              Nullsv
-#define pWARN_ALL              (Nullsv+1)      /* use warnings 'all' */
-#define pWARN_NONE             (Nullsv+2)      /* no  warnings 'all' */
+#define pWARN_STD              NULL
+#define pWARN_ALL              (((STRLEN*)0)+1)    /* use warnings 'all' */
+#define pWARN_NONE             (((STRLEN*)0)+2)    /* no  warnings 'all' */
 
 #define specialWARN(x)         ((x) == pWARN_STD || (x) == pWARN_ALL ||        \
                                 (x) == pWARN_NONE)
 
+/* if PL_warnhook is set to this value, then warnings die */
+#define PERL_WARNHOOK_FATAL    (&PL_sv_placeholder)
+
 /* Warnings Categories added in Perl 5.008 */
 
 #define WARN_ALL               0
 #define WARN_UTF8              44
 #define WARN_VOID              45
 
-/* Warnings Categories added in Perl 5.009 */
+/* Warnings Categories added in Perl 5.011 */
+
+#define WARN_IMPRECISION       46
+#define WARN_ILLEGALPROTO      47
+
+/* Warnings Categories added in Perl 5.013 */
 
-#define WARN_ASSERTIONS                46
+#define WARN_NON_UNICODE       48
+#define WARN_NONCHAR           49
+#define WARN_SURROGATE         50
 
-#define WARNsize               12
-#define WARN_ALLstring         "\125\125\125\125\125\125\125\125\125\125\125\125"
-#define WARN_NONEstring                "\0\0\0\0\0\0\0\0\0\0\0\0"
-#define WARN_TAINTstring       "\0\0\0\0\0\0\0\0\0\100\0\0"
+#define WARNsize               13
+#define WARN_ALLstring         "\125\125\125\125\125\125\125\125\125\125\125\125\125"
+#define WARN_NONEstring                "\0\0\0\0\0\0\0\0\0\0\0\0\0"
 
 #define isLEXWARN_on   (PL_curcop->cop_warnings != pWARN_STD)
 #define isLEXWARN_off  (PL_curcop->cop_warnings == pWARN_STD)
 #define isWARN_ONCE    (PL_dowarn & (G_WARN_ON|G_WARN_ONCE))
-#define isWARN_on(c,x) (IsSet(SvPVX_const(c), 2*(x)))
-#define isWARNf_on(c,x)        (IsSet(SvPVX_const(c), 2*(x)+1))
+#define isWARN_on(c,x) (IsSet((U8 *)(c + 1), 2*(x)))
+#define isWARNf_on(c,x)        (IsSet((U8 *)(c + 1), 2*(x)+1))
+
+#define DUP_WARNINGS(p)                \
+    (specialWARN(p) ? (STRLEN*)(p)     \
+    : (STRLEN*)CopyD(p, PerlMemShared_malloc(sizeof(*p)+*p), sizeof(*p)+*p, \
+                                            char))
 
 #define ckWARN(w)              Perl_ckwarn(aTHX_ packWARN(w))
 #define ckWARN2(w1,w2)         Perl_ckwarn(aTHX_ packWARN2(w1,w2))
 #define ckWARN3_d(w1,w2,w3)    Perl_ckwarn_d(aTHX_ packWARN3(w1,w2,w3))
 #define ckWARN4_d(w1,w2,w3,w4) Perl_ckwarn_d(aTHX_ packWARN4(w1,w2,w3,w4))
 
+#define WARNshift              8
+
 #define packWARN(a)            (a                                      )
 #define packWARN2(a,b)         ((a) | ((b)<<8)                         )
 #define packWARN3(a,b,c)       ((a) | ((b)<<8) | ((c)<<16)             )
              isWARNf_on(PL_curcop->cop_warnings, unpackWARN4(x))))
 
 /* end of file warnings.h */
+
 /* ex: set ro: */