In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/3664866ee329279683fd8c71e52e5983da4272dd?hp=0c60e3193cada7eee789f68009742a6f1c55c0ac>

- Log -----------------------------------------------------------------
commit 3664866ee329279683fd8c71e52e5983da4272dd
Author: Ævar Arnfjörð Bjarmason <[email protected]>
Date:   Sun Jan 19 14:58:02 2014 +0000

    Split up the fake "missing" warning category into an actual category
    
    Ever since the warning for missing printf arguments was added in
    v5.11.2-116-g7baa469 the "missing" warning category has been defined in
    terms of the "uninitialized" category, so you couldn't turn it on/off
    independently of that.
    
    As discussed in RT #121025 I'm hacking on adding a new "reduntant"
    category for too many printf arguments. So add the long-missing
    "missing" category in preparation for that for consistency.
-----------------------------------------------------------------------

Summary of changes:
 lib/warnings.pm   | 17 +++++++++++++----
 pod/perldiag.pod  |  9 +++++++--
 regen/warnings.pl |  8 +++++++-
 sv.c              |  1 -
 warnings.h        |  1 +
 5 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/lib/warnings.pm b/lib/warnings.pm
index 37e6e56..f650ef0 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -5,7 +5,7 @@
 
 package warnings;
 
-our $VERSION = '1.24';
+our $VERSION = '1.25';
 
 # Verify that we're called correctly so that warnings will work.
 # see also strict.pm.
@@ -301,6 +301,8 @@ The current hierarchy is:
          |
          +- misc
          |
+         +- missing
+         |
          +- numeric
          |
          +- once
@@ -396,6 +398,10 @@ Note: Before Perl 5.8.0, the lexical warnings category 
"deprecated" was a
 sub-category of the "syntax" category.  It is now a top-level category
 in its own right.
 
+Note: Before 5.21.0, the "missing" lexical warnings category was
+internally defined to be the same as the "uninitialized" category. It
+is now a top-level category in its own right.
+
 =head2 Fatal Warnings
 X<warning, fatal>
 
@@ -818,10 +824,11 @@ our %Offsets = (
     # Warnings Categories added in Perl 5.021
 
     'experimental::win32_perlio'=> 120,
+    'missing'          => 122,
   );
 
 our %Bits = (
-    'all'              => 
"\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x01", # [0..60]
+    'all'              => 
"\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x05", # [0..61]
     'ambiguous'                => 
"\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [29]
     'bareword'         => 
"\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [30]
     'closed'           => 
"\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
@@ -849,6 +856,7 @@ our %Bits = (
     'layer'            => 
"\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
     'malloc'           => 
"\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
     'misc'             => 
"\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
+    'missing'          => 
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [61]
     'newline'          => 
"\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
     'non_unicode'      => 
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [48]
     'nonchar'          => 
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [49]
@@ -885,7 +893,7 @@ our %Bits = (
   );
 
 our %DeadBits = (
-    'all'              => 
"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x02", # [0..60]
+    'all'              => 
"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x0a", # [0..61]
     'ambiguous'                => 
"\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [29]
     'bareword'         => 
"\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [30]
     'closed'           => 
"\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
@@ -913,6 +921,7 @@ our %DeadBits = (
     'layer'            => 
"\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
     'malloc'           => 
"\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
     'misc'             => 
"\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
+    'missing'          => 
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [61]
     'newline'          => 
"\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
     'non_unicode'      => 
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [48]
     'nonchar'          => 
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [49]
@@ -950,7 +959,7 @@ our %DeadBits = (
 
 $NONE     = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
 $DEFAULT  = 
"\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x55\x15\x01", # 
[2,56,52,53,57,54,58,55,60,4,22,23,25]
-$LAST_BIT = 122 ;
+$LAST_BIT = 124 ;
 $BYTES    = 16 ;
 
 $All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ;
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 8bd44ac..86ba73b 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -2987,8 +2987,13 @@ separate two digits.
 
 =item Missing argument in %s
 
-(W uninitialized) A printf-type format required more arguments than were
-supplied.
+(W missing) You called a function with fewer arguments than other
+arguments you supplied indicated would be needed.
+
+Currently only emitted when a printf-type format required more
+arguments than were supplied, but might be used in the future for
+other cases where we can statically determine that arguments to
+functions are missing, e.g. for the L<perlfunc/pack> function.
 
 =item Missing argument to -%c
 
diff --git a/regen/warnings.pl b/regen/warnings.pl
index 49fc88a..b910657 100644
--- a/regen/warnings.pl
+++ b/regen/warnings.pl
@@ -104,6 +104,8 @@ my $tree = {
                                     [ 5.021, DEFAULT_ON ],
                         }],
 
+               'missing'       => [ 5.021, DEFAULT_OFF],
+
                 #'default'     => [ 5.008, DEFAULT_ON ],
        }],
 } ;
@@ -472,7 +474,7 @@ read_only_bottom_close_and_rename($pm);
 __END__
 package warnings;
 
-our $VERSION = '1.24';
+our $VERSION = '1.25';
 
 # Verify that we're called correctly so that warnings will work.
 # see also strict.pm.
@@ -743,6 +745,10 @@ Note: Before Perl 5.8.0, the lexical warnings category 
"deprecated" was a
 sub-category of the "syntax" category.  It is now a top-level category
 in its own right.
 
+Note: Before 5.21.0, the "missing" lexical warnings category was
+internally defined to be the same as the "uninitialized" category. It
+is now a top-level category in its own right.
+
 =head2 Fatal Warnings
 X<warning, fatal>
 
diff --git a/sv.c b/sv.c
index e0b08d0..19afcb6 100644
--- a/sv.c
+++ b/sv.c
@@ -10522,7 +10522,6 @@ Perl_sv_vsetpvfn(pTHX_ SV *const sv, const char *const 
pat, const STRLEN patlen,
  * Warn of missing argument to sprintf, and then return a defined value
  * to avoid inappropriate "use of uninit" warnings [perl #71000].
  */
-#define WARN_MISSING WARN_UNINITIALIZED /* Not sure we want a new category */
 STATIC SV*
 S_vcatpvfn_missing_argument(pTHX) {
     if (ckWARN(WARN_MISSING)) {
diff --git a/warnings.h b/warnings.h
index 5bbb691..a5bd239 100644
--- a/warnings.h
+++ b/warnings.h
@@ -105,6 +105,7 @@
 /* Warnings Categories added in Perl 5.021 */
 
 #define WARN_EXPERIMENTAL__WIN32_PERLIO 60
+#define WARN_MISSING            61
 
 #define WARNsize               16
 #define WARN_ALLstring         
"\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125"

--
Perl5 Master Repository

Reply via email to