1 /* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
2 This file is built by warnings.pl
3 Any changes made here will be lost!
7 #define Off(x) ((x) / 8)
8 #define Bit(x) (1 << ((x) % 8))
9 #define IsSet(a, x) ((a)[Off(x)] & Bit(x))
12 #define G_WARN_OFF 0 /* $^W == 0 */
13 #define G_WARN_ON 1 /* -w flag and $^W != 0 */
14 #define G_WARN_ALL_ON 2 /* -W flag */
15 #define G_WARN_ALL_OFF 4 /* -X flag */
16 #define G_WARN_ONCE 8 /* set if 'once' ever enabled */
17 #define G_WARN_ALL_MASK (G_WARN_ALL_ON|G_WARN_ALL_OFF)
19 #define WARN_STD Nullsv
20 #define WARN_ALL (Nullsv+1) /* use warnings 'all' */
21 #define WARN_NONE (Nullsv+2) /* no warnings 'all' */
23 #define specialWARN(x) ((x) == WARN_STD || (x) == WARN_ALL || \
27 ( ! specialWARN(PL_curcop->cop_warnings) && \
28 IsSet(SvPVX(PL_curcop->cop_warnings), 2*x+1))
31 ( (PL_curcop->cop_warnings != WARN_STD && \
32 PL_curcop->cop_warnings != WARN_NONE && \
33 (PL_curcop->cop_warnings == WARN_ALL || \
34 IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) ) ) \
35 || (PL_curcop->cop_warnings == WARN_STD && PL_dowarn & G_WARN_ON) )
37 #define ckWARN2(x,y) \
38 ( (PL_curcop->cop_warnings != WARN_STD && \
39 PL_curcop->cop_warnings != WARN_NONE && \
40 (PL_curcop->cop_warnings == WARN_ALL || \
41 IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) || \
42 IsSet(SvPVX(PL_curcop->cop_warnings), 2*y) ) ) \
43 || (PL_curcop->cop_warnings == WARN_STD && PL_dowarn & G_WARN_ON) )
46 (PL_curcop->cop_warnings == WARN_STD || \
47 PL_curcop->cop_warnings == WARN_ALL || \
48 (PL_curcop->cop_warnings != WARN_NONE && \
49 IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) ) )
51 #define ckWARN2_d(x,y) \
52 (PL_curcop->cop_warnings == WARN_STD || \
53 PL_curcop->cop_warnings == WARN_ALL || \
54 (PL_curcop->cop_warnings != WARN_NONE && \
55 (IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) || \
56 IsSet(SvPVX(PL_curcop->cop_warnings), 2*y) ) ) )
59 #define isLEXWARN_on (PL_curcop->cop_warnings != WARN_STD)
60 #define isLEXWARN_off (PL_curcop->cop_warnings == WARN_STD)
61 #define isWARN_ONCE (PL_dowarn & (G_WARN_ON|G_WARN_ONCE))
62 #define isWARN_on(c,x) (IsSet(SvPVX(c), 2*(x)))
65 #define WARN_CLOSURE 1
66 #define WARN_EXITING 2
71 #define WARN_NEWLINE 7
73 #define WARN_UNOPENED 9
75 #define WARN_NUMERIC 11
77 #define WARN_OVERFLOW 13
79 #define WARN_PORTABLE 15
80 #define WARN_RECURSION 16
81 #define WARN_REDEFINE 17
82 #define WARN_REGEXP 18
83 #define WARN_SEVERE 19
84 #define WARN_DEBUGGING 20
85 #define WARN_INPLACE 21
86 #define WARN_INTERNAL 22
87 #define WARN_MALLOC 23
88 #define WARN_SIGNAL 24
89 #define WARN_SUBSTR 25
90 #define WARN_SYNTAX 26
91 #define WARN_AMBIGUOUS 27
92 #define WARN_BAREWORD 28
93 #define WARN_DEPRECATED 29
95 #define WARN_PARENTHESIS 31
96 #define WARN_PRECEDENCE 32
97 #define WARN_PRINTF 33
98 #define WARN_PROTOTYPE 34
100 #define WARN_RESERVED 36
101 #define WARN_SEMICOLON 37
102 #define WARN_TAINT 38
103 #define WARN_UMASK 39
104 #define WARN_UNINITIALIZED 40
105 #define WARN_UNPACK 41
106 #define WARN_UNTIE 42
112 #define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125"
113 #define WARN_NONEstring "\0\0\0\0\0\0\0\0\0\0\0\0"
115 /* end of file warnings.h */