X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=sv.c;h=f94e1bac7d5b105ffa69c7ee2f07c1dbe9146813;hb=869efde7048cf4e4bafcc463f8d4209a63e0d41a;hp=4a2110779bd26051fca78eb9af76b8bd7cc38ccb;hpb=89c14e2ec1b845cd5ec17986d2c65288a7da7ba8;p=p5sagit%2Fp5-mst-13.2.git diff --git a/sv.c b/sv.c index 4a21107..f94e1ba 100644 --- a/sv.c +++ b/sv.c @@ -354,7 +354,7 @@ Perl_sv_add_arena(pTHX_ char *ptr, U32 size, U32 flags) #ifdef DEBUGGING SvREFCNT(sv) = 0; #endif - /* Must always set typemask because it's awlays checked in on cleanup + /* Must always set typemask because it's always checked in on cleanup when the arenas are walked looking for objects. */ SvFLAGS(sv) = SVTYPEMASK; sv++; @@ -9194,7 +9194,9 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV : SvNV(argsv); need = 0; - if (c != 'e' && c != 'E') { + /* nv * 0 will be NaN for NaN, +Inf and -Inf, and 0 for anything + else. frexp() has some unspecified behaviour for those three */ + if (c != 'e' && c != 'E' && (nv * 0) == 0) { i = PERL_INT_MIN; /* FIXME: if HAS_LONG_DOUBLE but not USE_LONG_DOUBLE this will cast our (long double) to (double) */ @@ -12077,6 +12079,11 @@ S_find_uninit_var(pTHX_ OP* obase, SV* uninit_sv, bool match) match = 1; /* XS or custom code could trigger random warnings */ goto do_op; + case OP_POS: + /* def-ness of rval pos() is independent of the def-ness of its arg */ + if ( !(obase->op_flags & OPf_MOD)) + break; + case OP_SCHOMP: case OP_CHOMP: if (SvROK(PL_rs) && uninit_sv == SvRV(PL_rs))