From: Simon Glover Date: Tue, 26 Feb 2002 17:56:42 +0000 (+0000) Subject: Subject: Missing diagnostics X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ed9aa3b75c508a7baf4c55afe519cd2c35782757;p=p5sagit%2Fp5-mst-13.2.git Subject: Missing diagnostics Date: Tue, 26 Feb 2002 17:56:42 +0000 (BST) Message-Id: Subject: [PATCH] Better wording for the lvalue vec diagnostic From: Simon Glover Date: Tue, 26 Feb 2002 18:08:04 +0000 (BST) Message-Id: p4raw-id: //depot/perl@14887 --- diff --git a/doop.c b/doop.c index d59dba6..7a8f883 100644 --- a/doop.c +++ b/doop.c @@ -872,7 +872,7 @@ Perl_do_vecset(pTHX_ SV *sv) lval = SvUV(sv); offset = LvTARGOFF(sv); if (offset < 0) - Perl_croak(aTHX_ "Assigning to negative offset in vec"); + Perl_croak(aTHX_ "Negative offset to vec in lvalue context"); size = LvTARGLEN(sv); if (size < 1 || (size & (size-1))) /* size < 1 or not a power of two */ Perl_croak(aTHX_ "Illegal number of bits in vec"); diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 56c843e..9db2807 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1,3 +1,4 @@ +//depot/perl/pod/perldiag.pod#272 - edit change 14824 (text) =head1 NAME perldiag - various Perl diagnostics @@ -182,11 +183,6 @@ spots. This is now heavily deprecated. must either both be scalars or both be lists. Otherwise Perl won't know which context to supply to the right side. -=item Negative offset to vec in lvalue context - -(F) When C is called in an lvalue context, the second argument must be -greater than or equal to zero. - =item Attempt to access key '%_' in fixed hash (F) A hash has been marked as READONLY at the C level to turn it @@ -1351,6 +1347,10 @@ Perl identifier. If you're just trying to glob a long list of filenames, try using the glob() operator, or put the filenames into a variable and glob that. +=item exec? I'm not *that* kind of operating system + +(F) The C function is not implemented in MacPerl. See L. + =item Execution of %s aborted due to compilation errors (F) The final summary message when a Perl compilation fails. @@ -2030,6 +2030,13 @@ couldn't be created for some peculiar reason. you omitted the name of the module. Consult L for full details about C<-M> and C<-m>. +=item More than one argument to open + +(F) The C function has been asked to open multiple files. This +can happen if you are trying to open a pipe to a command that takes a +list of arguments, but have forgotten to specify a piped open mode. +See L for details. + =item msg%s not implemented (F) You don't have System V message IPC on your system. @@ -2079,6 +2086,11 @@ provided for this purpose. (F) You tried to do a read/write/send/recv operation with a buffer length that is less than 0. This is difficult to imagine. +=item Negative offset to vec in lvalue context + +(F) When C is called in an lvalue context, the second argument must be +greater than or equal to zero. + =item Nested quantifiers in regex; marked by <-- HERE in m/%s/ (F) You can't quantify a quantifier without intervening parentheses. So @@ -2926,6 +2938,11 @@ in L. (S prototype) The subroutine being declared or defined had previously been declared or defined with a different function prototype. +=item Prototype not terminated + +(F) You've omitted the closing parenthesis in a function prototype +definition. + =item Quantifier in {,} bigger than %d in regex; marked by <-- HERE in m/%s/ diff --git a/t/op/vec.t b/t/op/vec.t index 4b8934d..67d7527 100755 --- a/t/op/vec.t +++ b/t/op/vec.t @@ -46,7 +46,7 @@ $x = eval { vec $foo, 0, -13 }; print "not " if defined $x or $@ !~ /^Illegal number of bits in vec/; print "ok 21\n"; $x = eval { vec($foo, -1, 4) = 2 }; -print "not " if defined $x or $@ !~ /^Assigning to negative offset in vec/; +print "not " if defined $x or $@ !~ /^Negative offset to vec in lvalue context/; print "ok 22\n"; print "not " if vec('abcd', 7, 8); print "ok 23\n";