diff options
author | Ævar Arnfjörð Bjarmason <avar@cpan.org> | 2015-01-25 14:10:13 +0000 |
---|---|---|
committer | Ævar Arnfjörð Bjarmason <avar@cpan.org> | 2015-01-25 15:16:21 +0000 |
commit | 3c3f8cd64edb32a0dac554f7a524cc222184c3ec (patch) | |
tree | a75cb811c9660e61940c6d7529b62ee7e9777163 /warnings.h | |
parent | 75debb79e45d698f62a32fcd7d1b020a8a677eda (diff) | |
download | perl-3c3f8cd64edb32a0dac554f7a524cc222184c3ec.tar.gz |
Revert the support for new warning categories outside of "all"
This reverts & amends my v5.21.7-151-gea5519d and Karl Williamson's
v5.21.7-183-g2f3cbe1, the latter was only need because of the
former.
I've also taken the opportunity to fix the long-standing trivial bug
with misaligned code in warnings.{pm,h}. That was easier to commit along
with this than to split it up from the other generated changes.
Why revert this? See the "use warnings 'absolutely-all-almost';" thread
on perl5-porters for the latest summary:
http://www.nntp.perl.org/group/perl.perl5.porters/2015/01/msg225066.html
Basically as I explained in v5.21.7-151-gea5519d the current design of
the API makes it too contentious to freely add new warnings, but there's
no consensus on how to solve that. I.e. whether we should just add them
to "all", or do this change, or several other possible things outlined
in that thread and elsewhere.
Since the deadline for contentious changes for v5.22 is already past us
I'm backing this out for now.
Diffstat (limited to 'warnings.h')
-rw-r--r-- | warnings.h | 143 |
1 files changed, 70 insertions, 73 deletions
diff --git a/warnings.h b/warnings.h index 6a8009635a..cc3afc3cfb 100644 --- a/warnings.h +++ b/warnings.h @@ -29,95 +29,92 @@ /* Warnings Categories added in Perl 5.008 */ -#define WARN_ALL 0 -#define WARN_CLOSURE 1 -#define WARN_DEPRECATED 2 -#define WARN_EXITING 3 -#define WARN_GLOB 4 -#define WARN_IO 5 -#define WARN_CLOSED 6 -#define WARN_EXEC 7 -#define WARN_LAYER 8 -#define WARN_NEWLINE 9 -#define WARN_PIPE 10 -#define WARN_UNOPENED 11 -#define WARN_MISC 12 -#define WARN_NUMERIC 13 -#define WARN_ONCE 14 -#define WARN_OVERFLOW 15 -#define WARN_PACK 16 -#define WARN_PORTABLE 17 -#define WARN_RECURSION 18 -#define WARN_REDEFINE 19 -#define WARN_REGEXP 20 -#define WARN_SEVERE 21 -#define WARN_DEBUGGING 22 -#define WARN_INPLACE 23 -#define WARN_INTERNAL 24 -#define WARN_MALLOC 25 -#define WARN_SIGNAL 26 -#define WARN_SUBSTR 27 -#define WARN_SYNTAX 28 -#define WARN_AMBIGUOUS 29 -#define WARN_BAREWORD 30 -#define WARN_DIGIT 31 -#define WARN_PARENTHESIS 32 -#define WARN_PRECEDENCE 33 -#define WARN_PRINTF 34 -#define WARN_PROTOTYPE 35 -#define WARN_QW 36 -#define WARN_RESERVED 37 -#define WARN_SEMICOLON 38 -#define WARN_TAINT 39 -#define WARN_THREADS 40 -#define WARN_UNINITIALIZED 41 -#define WARN_UNPACK 42 -#define WARN_UNTIE 43 -#define WARN_UTF8 44 -#define WARN_VOID 45 +#define WARN_ALL 0 +#define WARN_CLOSURE 1 +#define WARN_DEPRECATED 2 +#define WARN_EXITING 3 +#define WARN_GLOB 4 +#define WARN_IO 5 +#define WARN_CLOSED 6 +#define WARN_EXEC 7 +#define WARN_LAYER 8 +#define WARN_NEWLINE 9 +#define WARN_PIPE 10 +#define WARN_UNOPENED 11 +#define WARN_MISC 12 +#define WARN_NUMERIC 13 +#define WARN_ONCE 14 +#define WARN_OVERFLOW 15 +#define WARN_PACK 16 +#define WARN_PORTABLE 17 +#define WARN_RECURSION 18 +#define WARN_REDEFINE 19 +#define WARN_REGEXP 20 +#define WARN_SEVERE 21 +#define WARN_DEBUGGING 22 +#define WARN_INPLACE 23 +#define WARN_INTERNAL 24 +#define WARN_MALLOC 25 +#define WARN_SIGNAL 26 +#define WARN_SUBSTR 27 +#define WARN_SYNTAX 28 +#define WARN_AMBIGUOUS 29 +#define WARN_BAREWORD 30 +#define WARN_DIGIT 31 +#define WARN_PARENTHESIS 32 +#define WARN_PRECEDENCE 33 +#define WARN_PRINTF 34 +#define WARN_PROTOTYPE 35 +#define WARN_QW 36 +#define WARN_RESERVED 37 +#define WARN_SEMICOLON 38 +#define WARN_TAINT 39 +#define WARN_THREADS 40 +#define WARN_UNINITIALIZED 41 +#define WARN_UNPACK 42 +#define WARN_UNTIE 43 +#define WARN_UTF8 44 +#define WARN_VOID 45 /* Warnings Categories added in Perl 5.011 */ -#define WARN_IMPRECISION 46 -#define WARN_ILLEGALPROTO 47 +#define WARN_IMPRECISION 46 +#define WARN_ILLEGALPROTO 47 /* Warnings Categories added in Perl 5.013 */ -#define WARN_NON_UNICODE 48 -#define WARN_NONCHAR 49 -#define WARN_SURROGATE 50 +#define WARN_NON_UNICODE 48 +#define WARN_NONCHAR 49 +#define WARN_SURROGATE 50 /* Warnings Categories added in Perl 5.017 */ -#define WARN_EXPERIMENTAL 51 -#define WARN_EXPERIMENTAL__LEXICAL_SUBS 52 +#define WARN_EXPERIMENTAL 51 +#define WARN_EXPERIMENTAL__LEXICAL_SUBS 52 #define WARN_EXPERIMENTAL__LEXICAL_TOPIC 53 -#define WARN_EXPERIMENTAL__REGEX_SETS 54 -#define WARN_EXPERIMENTAL__SMARTMATCH 55 +#define WARN_EXPERIMENTAL__REGEX_SETS 54 +#define WARN_EXPERIMENTAL__SMARTMATCH 55 /* Warnings Categories added in Perl 5.019 */ -#define WARN_EXPERIMENTAL__AUTODEREF 56 -#define WARN_EXPERIMENTAL__POSTDEREF 57 -#define WARN_EXPERIMENTAL__SIGNATURES 58 -#define WARN_SYSCALLS 59 +#define WARN_EXPERIMENTAL__AUTODEREF 56 +#define WARN_EXPERIMENTAL__POSTDEREF 57 +#define WARN_EXPERIMENTAL__SIGNATURES 58 +#define WARN_SYSCALLS 59 /* Warnings Categories added in Perl 5.021 */ -#define WARN_EVERYTHING 60 -#define WARN_EXPERIMENTAL__CONST_ATTR 61 -#define WARN_EXPERIMENTAL__RE_STRICT 62 -#define WARN_EXPERIMENTAL__REFALIASING 63 -#define WARN_EXPERIMENTAL__WIN32_PERLIO 64 -#define WARN_LOCALE 65 -#define WARN_MISSING 66 -#define WARN_REDUNDANT 67 -#define WARN_EXTRA 68 -#define WARN_VOID_UNUSUAL 69 - -#define WARNsize 18 -#define WARN_ALLstring "\125\125\125\125\125\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\0\0\0\0\0" +#define WARN_EXPERIMENTAL__CONST_ATTR 60 +#define WARN_EXPERIMENTAL__RE_STRICT 61 +#define WARN_EXPERIMENTAL__REFALIASING 62 +#define WARN_EXPERIMENTAL__WIN32_PERLIO 63 +#define WARN_LOCALE 64 +#define WARN_MISSING 65 +#define WARN_REDUNDANT 66 + +#define WARNsize 17 +#define WARN_ALLstring "\125\125\125\125\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\0\0\0\0" #define isLEXWARN_on (PL_curcop->cop_warnings != pWARN_STD) #define isLEXWARN_off (PL_curcop->cop_warnings == pWARN_STD) |