1 /* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
2 This file is built by warning.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))
11 #define G_WARN_OFF 0 /* $^W == 0 */
12 #define G_WARN_ON 1 /* $^W != 0 */
13 #define G_WARN_ALL_ON 2 /* -W flag */
14 #define G_WARN_ALL_OFF 4 /* -X flag */
15 #define G_WARN_ALL_MASK (G_WARN_ALL_ON|G_WARN_ALL_OFF)
19 /* Part of the logic below assumes that WARN_NONE is NULL */
22 (PL_curcop->cop_warnings != WARN_ALL && \
23 PL_curcop->cop_warnings != WARN_NONE && \
24 IsSet(SvPVX(PL_curcop->cop_warnings), 2*x+1))
27 ( (PL_curcop->cop_warnings && \
28 (PL_curcop->cop_warnings == WARN_ALL || \
29 IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) ) ) \
30 || (PL_dowarn & G_WARN_ON) )
32 #define ckWARN2(x,y) \
33 ( (PL_curcop->cop_warnings && \
34 (PL_curcop->cop_warnings == WARN_ALL || \
35 IsSet(SvPVX(PL_curcop->cop_warnings), 2*x) || \
36 IsSet(SvPVX(PL_curcop->cop_warnings), 2*y) ) ) \
37 || (PL_dowarn & G_WARN_ON) )
42 (PL_curcop->cop_warnings != WARN_ALL && \
43 PL_curcop->cop_warnings != WARN_NONE && \
44 SvPVX(PL_curcop->cop_warnings)[Off(2*x+1)] & Bit(2*x+1) )
47 ( (PL_dowarn & G_WARN_ON) || ( (PL_dowarn & G_WARN_DISABLE) && \
48 PL_curcop->cop_warnings && \
49 ( PL_curcop->cop_warnings == WARN_ALL || \
50 SvPVX(PL_curcop->cop_warnings)[Off(2*x)] & Bit(2*x) ) ) )
52 #define ckWARN2(x,y) \
53 ( (PL_dowarn & G_WARN_ON) || ( (PL_dowarn & G_WARN_DISABLE) && \
54 PL_curcop->cop_warnings && \
55 ( PL_curcop->cop_warnings == WARN_ALL || \
56 SvPVX(PL_curcop->cop_warnings)[Off(2*x)] & Bit(2*x) || \
57 SvPVX(PL_curcop->cop_warnings)[Off(2*y)] & Bit(2*y) ) ) )
61 #define WARN_NONE NULL
62 #define WARN_ALL (&PL_sv_yes)
64 #define WARN_DEFAULT 0
68 #define WARN_NEWLINE 4
70 #define WARN_UNOPENED 6
72 #define WARN_NUMERIC 8
74 #define WARN_RECURSION 10
75 #define WARN_REDEFINE 11
76 #define WARN_SYNTAX 12
77 #define WARN_AMBIGUOUS 13
78 #define WARN_DEPRECATED 14
80 #define WARN_PARENTHESIS 16
81 #define WARN_PRECEDENCE 17
82 #define WARN_PRINTF 18
83 #define WARN_RESERVED 19
84 #define WARN_SEMICOLON 20
85 #define WARN_UNINITIALIZED 21
86 #define WARN_UNSAFE 22
87 #define WARN_CLOSURE 23
88 #define WARN_SIGNAL 24
89 #define WARN_SUBSTR 25
96 #define WARN_ALLstring "\125\125\125\125\125\125\125\125"
97 #define WARN_NONEstring "\0\0\0\0\0\0\0\0"
99 /* end of file warning.h */