diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-09-13 03:03:57 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-09-13 03:03:57 +0000 |
commit | 6bc102ca57c5133ccb41282f9b318b89d8ec7a82 (patch) | |
tree | f2865fee6aba38a706931f32bbe5954a66904917 /t/pragma/warn/pp_hot | |
parent | 3e92a2540996678c49663ee454dadc7970cdb925 (diff) | |
download | perl-6bc102ca57c5133ccb41282f9b318b89d8ec7a82.tar.gz |
add -DPERL_Y2KWARN build option that will generate additional
warnings on "19$yy" etc (reworked a patch suggested by
Ulrich Pfeifer <upf@de.uu.net>)
p4raw-id: //depot/perl@4132
Diffstat (limited to 't/pragma/warn/pp_hot')
-rw-r--r-- | t/pragma/warn/pp_hot | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/t/pragma/warn/pp_hot b/t/pragma/warn/pp_hot index 6bd315148f..9a4b0a0708 100644 --- a/t/pragma/warn/pp_hot +++ b/t/pragma/warn/pp_hot @@ -36,11 +36,13 @@ glob failed (child exited with status %d%s) [Perl_do_readline] <<TODO Deep recursion on subroutine \"%s\" [Perl_sub_crush_depth] - sub fred { fred() if $a++ < 200} fred() + sub fred { fred() if $a++ < 200} fred() Deep recursion on anonymous subroutine [Perl_sub_crush_depth] - $a = sub { &$a if $a++ < 200} &$a + $a = sub { &$a if $a++ < 200} &$a + Possible Y2K bug: about to append an integer to '19' [pp_concat] + $x = "19$yy\n"; __END__ # pp_hot.c [pp_print] @@ -189,4 +191,25 @@ $b = sub &$b ; EXPECT - +######## +# pp_hot.c [pp_concat] +use warnings 'misc'; +use Config; +BEGIN { + unless ($Config{ccflags} =~ /Y2KWARN/) { + print "SKIPPED\n# perl not built with -DPERL_Y2KWARN"; + exit 0; + } +} +my $x; +my $yy = 78; +$x = "19$yy\n"; +$x = "19" . $yy . "\n"; +$x = "319$yy\n"; +$x = "319" . $yy . "\n"; +no warnings 'misc'; +$x = "19$yy\n"; +$x = "19" . $yy . "\n"; +EXPECT +Possible Y2K bug: about to append an integer to '19' at - line 12. +Possible Y2K bug: about to append an integer to '19' at - line 13. |