diag.t needs to know that yywarn implies WARN_SYNTAX
authorFather Chrysostomos <sprout@cpan.org>
Mon, 21 Aug 2017 21:33:14 +0000 (14:33 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 22 Aug 2017 03:17:58 +0000 (20:17 -0700)
because yywarn calls yyerror with PL_in_eval containing the EVAL_WARNONLY
flag, and yyerror calls Perl_ck_warner_d(aTHX_ packWARN(WARN_SYNTAX),...)
when that flag is set.

t/porting/diag.t

index 037e237..22cde90 100644 (file)
@@ -305,6 +305,8 @@ sub check_file {
       # Sometimes the regexp will pick up too much for the category
       # e.g., WARN_UNINITIALIZED), PL_warn_uninit_sv ... up to the next )
       $category && $category =~ s/\).*//s;
+      # Special-case yywarn
+      /yywarn/ and $category = 'syntax';
       if (/win32_croak_not_implemented\(/) {
         $name .= " not implemented!"
       }