summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-04-06 22:03:33 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-04-06 22:03:51 -0700
commit837c87981b0d72533fc9e43f83cca13e78853569 (patch)
tree273a71d8e41292124355480f817a4a7a04075472 /pp_hot.c
parent4c3ac4ba94c3963cbfea8fd6a28648d68ac6063a (diff)
downloadperl-837c87981b0d72533fc9e43f83cca13e78853569.tar.gz
Correct stupidities in 4c3ac4b
Allocating an extra SV for rare edge cases...er...only needs to be done in those rare edge cases. Uninitialized warnings are only supposed to be enabled when they are.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 3d46287c7a..06b837bf15 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -501,10 +501,13 @@ PP(pp_add)
svl = TOPm1s;
useleft = USE_LEFT(svl);
- if(useleft && svr == svl) {
+ if(useleft && svr == svl && SvGMAGICAL(svl)) {
/* Print the uninitialized warning now, so it includes the vari-
able name. */
- if (!SvOK(svl)) report_uninit(svl), useleft = 0;
+ if (!SvOK(svl)) {
+ if (ckWARN(WARN_UNINITIALIZED)) report_uninit(svl);
+ useleft = 0;
+ }
/* Non-magical sv_mortalcopy */
svl = sv_newmortal();
sv_setsv_flags(svl, svr, 0);