Skip to content

Commit

Permalink
Add a new warning experimental::for_list.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwc10 authored and rjbs committed Oct 15, 2021
1 parent d9b6ecc commit 3b54923
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
15 changes: 10 additions & 5 deletions lib/warnings.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

package warnings;

our $VERSION = "1.54";
our $VERSION = "1.55";

# Verify that we're called correctly so that warnings will work.
# Can't use Carp, since Carp uses us!
Expand Down Expand Up @@ -114,6 +114,7 @@ our %Offsets = (

# Warnings Categories added in Perl 5.035
'experimental::defer' => 148,
'experimental::for_list' => 150,
);

our %Bits = (
Expand All @@ -127,12 +128,13 @@ our %Bits = (
'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [31]
'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x55\x51\x05\x54\x54\x15", # [51..56,58..61,65..67,69..74]
'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x55\x51\x05\x54\x54\x55", # [51..56,58..61,65..67,69..75]
'experimental::alpha_assertions' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [66]
'experimental::bitwise' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [58]
'experimental::const_attr' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [59]
'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [65]
'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [74]
'experimental::for_list' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40", # [75]
'experimental::isa' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [72]
'experimental::lexical_subs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [52]
'experimental::postderef' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [55]
Expand Down Expand Up @@ -205,12 +207,13 @@ our %DeadBits = (
'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [31]
'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xaa\xa2\x0a\xa8\xa8\x2a", # [51..56,58..61,65..67,69..74]
'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xaa\xa2\x0a\xa8\xa8\xaa", # [51..56,58..61,65..67,69..75]
'experimental::alpha_assertions' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [66]
'experimental::bitwise' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [58]
'experimental::const_attr' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [59]
'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [65]
'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [74]
'experimental::for_list' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80", # [75]
'experimental::isa' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [72]
'experimental::lexical_subs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [52]
'experimental::postderef' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [55]
Expand Down Expand Up @@ -274,8 +277,8 @@ our %DeadBits = (

# These are used by various things, including our own tests
our $NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
our $DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x55\x51\x15\x54\x54\x15"; # [2,4,22,23,25,52..56,58..62,65..67,69..74]
our $LAST_BIT = 150 ;
our $DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x55\x51\x15\x54\x54\x55"; # [2,4,22,23,25,52..56,58..62,65..67,69..75]
our $LAST_BIT = 152 ;
our $BYTES = 19 ;

sub Croaker
Expand Down Expand Up @@ -883,6 +886,8 @@ The current hierarchy is:
| |
| +- experimental::defer
| |
| +- experimental::for_list
| |
| +- experimental::isa
| |
| +- experimental::lexical_subs
Expand Down
4 changes: 3 additions & 1 deletion regen/warnings.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# This script is normally invoked from regen.pl.

$VERSION = '1.54';
$VERSION = '1.55';

BEGIN {
require './regen/regen_lib.pl';
Expand Down Expand Up @@ -121,6 +121,8 @@ BEGIN
[ 5.033, DEFAULT_ON ],
'experimental::defer' =>
[ 5.035, DEFAULT_ON ],
'experimental::for_list' =>
[ 5.035, DEFAULT_ON ],
}],

'missing' => [ 5.021, DEFAULT_OFF],
Expand Down
2 changes: 2 additions & 0 deletions warnings.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
/* Warnings Categories added in Perl 5.035 */

#define WARN_EXPERIMENTAL__DEFER 74
#define WARN_EXPERIMENTAL__FOR_LIST 75
#define WARNsize 19
#define WARN_ALLstring "\125\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\0"
Expand Down Expand Up @@ -321,6 +322,7 @@ category parameters passed.
=for apidoc Amnh||WARN_EXPERIMENTAL__ISA
=for apidoc Amnh||WARN_EXPERIMENTAL__TRY
=for apidoc Amnh||WARN_EXPERIMENTAL__DEFER
=for apidoc Amnh||WARN_EXPERIMENTAL__FOR_LIST
=cut
*/
Expand Down

0 comments on commit 3b54923

Please sign in to comment.