From d3cdb7217b5126d36b00eccc3a6755589554862e Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 28 Sep 2021 12:36:51 +0000 Subject: Remove pp_pack "unlisted" exceptions from t/porting/diag.t "Invalid type '%c' in %s" is listed as "Invalid type '%s' in %s" (ie %s not %c) Append " in %s" to the perldiag.pod entry for the error "'/' does not take a repeat count" --- pp_pack.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pp_pack.c') diff --git a/pp_pack.c b/pp_pack.c index b64d911be7..78104a978c 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -453,6 +453,7 @@ S_measure_struct(pTHX_ tempsym_t* symptr) /* endianness doesn't influence the size of a type */ switch(TYPE_NO_ENDIANNESS(symptr->code)) { default: + /* diag_listed_as: Invalid type '%s' in %s */ Perl_croak(aTHX_ "Invalid type '%c' in %s", (int)TYPE_NO_MODIFIERS(symptr->code), _action( symptr ) ); @@ -616,6 +617,7 @@ S_next_symbol(pTHX_ tempsym_t* symptr ) if (code == ','){ if (((symptr->flags & FLAG_COMMA) == 0) && ckWARN(WARN_UNPACK)){ symptr->flags |= FLAG_COMMA; + /* diag_listed_as: Invalid type '%s' in %s */ Perl_warner(aTHX_ packWARN(WARN_UNPACK), "Invalid type ',' in %s", _action( symptr ) ); } @@ -918,6 +920,7 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c switch(TYPE_NO_ENDIANNESS(datumtype)) { default: + /* diag_listed_as: Invalid type '%s' in %s */ Perl_croak(aTHX_ "Invalid type '%c' in unpack", (int)TYPE_NO_MODIFIERS(datumtype) ); case '%': @@ -2187,6 +2190,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) doesn't simply leave using break */ switch (TYPE_NO_ENDIANNESS(datumtype)) { default: + /* diag_listed_as: Invalid type '%s' in %s */ Perl_croak(aTHX_ "Invalid type '%c' in pack", (int) TYPE_NO_MODIFIERS(datumtype)); case '%': -- cgit v1.2.1