sv.c warn(warn_uninit); warn(warn_uninit); warn(warn_uninit); warn(warn_uninit); not_a_number(sv); not_a_number(sv); warn(warn_uninit); not_a_number(sv); warn(warn_uninit); not_a_number(sv); not_a_number(sv); warn(warn_uninit); warn(warn_uninit); Subroutine %s redefined Invalid conversion in %s: Undefined value assigned to typeglob Mandatory Warnings ------------------ Malformed UTF-8 character [sv_pos_b2u] my $a = rindex "a\xff bc ", "bc" ; Mandatory Warnings TODO ------------------ Attempt to free non-arena SV: 0x%lx [del_sv] Reference miscount in sv_replace() [sv_replace] Attempt to free unreferenced scalar [sv_free] Attempt to free temp prematurely: SV 0x%lx [sv_free] semi-panic: attempt to dup freed string [newSVsv] __END__ # sv.c use integer ; use warnings 'uninitialized' ; $x = 1 + $a[0] ; # a no warnings 'uninitialized' ; $x = 1 + $b[0] ; # a EXPECT Use of uninitialized value at - line 4. ######## # sv.c (sv_2iv) package fred ; sub TIESCALAR { my $x ; bless \$x} sub FETCH { return undef } sub STORE { return 1 } package main ; tie $A, 'fred' ; use integer ; use warnings 'uninitialized' ; $A *= 2 ; no warnings 'uninitialized' ; $A *= 2 ; EXPECT Use of uninitialized value at - line 10. ######## # sv.c use integer ; use warnings 'uninitialized' ; my $x *= 2 ; #b no warnings 'uninitialized' ; my $y *= 2 ; #b EXPECT Use of uninitialized value at - line 4. ######## # sv.c (sv_2uv) package fred ; sub TIESCALAR { my $x ; bless \$x} sub FETCH { return undef } sub STORE { return 1 } package main ; tie $A, 'fred' ; use warnings 'uninitialized' ; $B = 0 ; $B |= $A ; no warnings 'uninitialized' ; $B = 0 ; $B |= $A ; EXPECT Use of uninitialized value at - line 10. ######## # sv.c use warnings 'uninitialized' ; my $Y = 1 ; my $x = 1 | $a[$Y] ; no warnings 'uninitialized' ; my $Y = 1 ; $x = 1 | $b[$Y] ; EXPECT Use of uninitialized value at - line 4. ######## # sv.c use warnings 'uninitialized' ; my $x *= 1 ; # d no warnings 'uninitialized' ; my $y *= 1 ; # d EXPECT Use of uninitialized value at - line 3. ######## # sv.c use warnings 'uninitialized' ; $x = 1 + $a[0] ; # e no warnings 'uninitialized' ; $x = 1 + $b[0] ; # e EXPECT Use of uninitialized value at - line 3. ######## # sv.c (sv_2nv) package fred ; sub TIESCALAR { my $x ; bless \$x} sub FETCH { return undef } sub STORE { return 1 } package main ; tie $A, 'fred' ; use warnings 'uninitialized' ; $A *= 2 ; no warnings 'uninitialized' ; $A *= 2 ; EXPECT Use of uninitialized value at - line 9. ######## # sv.c use warnings 'uninitialized' ; $x = $y + 1 ; # f no warnings 'uninitialized' ; $x = $z + 1 ; # f EXPECT Use of uninitialized value at - line 3. ######## # sv.c use warnings 'uninitialized' ; $x = chop undef ; # g no warnings 'uninitialized' ; $x = chop undef ; # g EXPECT Modification of a read-only value attempted at - line 3. ######## # sv.c use warnings 'uninitialized' ; $x = chop $y ; # h no warnings 'uninitialized' ; $x = chop $z ; # h EXPECT Use of uninitialized value at - line 3. ######## # sv.c (sv_2pv) package fred ; sub TIESCALAR { my $x ; bless \$x} sub FETCH { return undef } sub STORE { return 1 } package main ; tie $A, 'fred' ; use warnings 'uninitialized' ; $B = "" ; $B .= $A ; no warnings 'uninitialized' ; $C = "" ; $C .= $A ; EXPECT Use of uninitialized value at - line 10. ######## # sv.c use warnings 'numeric' ; sub TIESCALAR{bless[]} ; sub FETCH {"def"} ; tie $a,"main" ; my $b = 1 + $a; no warnings 'numeric' ; my $c = 1 + $a; EXPECT Argument "def" isn't numeric in add at - line 6. ######## # sv.c use warnings 'numeric' ; my $x = 1 + "def" ; no warnings 'numeric' ; my $z = 1 + "def" ; EXPECT Argument "def" isn't numeric in add at - line 3. ######## # sv.c use warnings 'numeric' ; my $a = "def" ; my $x = 1 + $a ; no warnings 'numeric' ; my $y = 1 + $a ; EXPECT Argument "def" isn't numeric in add at - line 4. ######## # sv.c use warnings 'numeric' ; use integer ; my $a = "def" ; my $x = 1 + $a ; no warnings 'numeric' ; my $z = 1 + $a ; EXPECT Argument "def" isn't numeric in i_add at - line 4. ######## # sv.c use warnings 'numeric' ; my $x = 1 & "def" ; no warnings 'numeric' ; my $z = 1 & "def" ; EXPECT Argument "def" isn't numeric in bit_and at - line 3. ######## # sv.c use warnings 'redefine' ; sub fred {} sub joe {} *fred = \&joe ; no warnings 'redefine' ; sub jim {} *jim = \&joe ; EXPECT Subroutine fred redefined at - line 5. ######## # sv.c use warnings 'printf' ; open F, ">".($^O eq 'VMS'? 'NL:' : '/dev/null') ; printf F "%z\n" ; my $a = sprintf "%z" ; printf F "%" ; $a = sprintf "%" ; printf F "%\x02" ; $a = sprintf "%\x02" ; no warnings 'printf' ; printf F "%z\n" ; $a = sprintf "%z" ; printf F "%" ; $a = sprintf "%" ; printf F "%\x02" ; $a = sprintf "%\x02" ; EXPECT Invalid conversion in sprintf: "%z" at - line 5. Invalid conversion in sprintf: end of string at - line 7. Invalid conversion in sprintf: "%\002" at - line 9. Invalid conversion in printf: "%z" at - line 4. Invalid conversion in printf: end of string at - line 6. Invalid conversion in printf: "%\002" at - line 8. ######## # sv.c use warnings 'unsafe' ; *a = undef ; no warnings 'unsafe' ; *b = undef ; EXPECT Undefined value assigned to typeglob at - line 3. ######## # sv.c use utf8 ; $^W =0 ; { use warnings 'utf8' ; my $a = rindex "a\xff bc ", "bc" ; no warnings 'utf8' ; $a = rindex "a\xff bc ", "bc" ; } my $a = rindex "a\xff bc ", "bc" ; EXPECT \xff will produce malformed UTF-8 character; use \x{ff} for that at - line 6. Malformed UTF-8 character at - line 6. Malformed UTF-8 character at - line 10.