diff options
author | Steve Peters <steve@fisharerojo.org> | 2005-02-14 13:54:17 -0600 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-04-07 09:53:08 +0000 |
commit | 88697ed32f5db53f5056302cc9a481a9955c7a4f (patch) | |
tree | 4c2b9781cc8481af42af4d217a3ce1685a02bf91 /perly.y | |
parent | 0d81f35eb4344b01c2723727fceae422baaebde8 (diff) | |
download | perl-88697ed32f5db53f5056302cc9a481a9955c7a4f.tar.gz |
Integrate:
[ 23960]
[perl #34101] not() || 1 produces segmentation fault
Fixed by making not() behave like not(0). This is also the
way not() behaved before it started segfaulting in 5.6.0.
[ 23967]
Subject: [PATCH] Additional tests for t/op/not.t
Message-ID: <20050215015417.GA30368@mccoy.peters.homeunix.org>
p4raw-link: @23967 on //depot/perl: 1b293ed1e0e66b606ed121bd34c8112e6fd8e30d
p4raw-link: @23960 on //depot/perl: a758b0b5fd9985d853637e2aa988519329533771
p4raw-id: //depot/maint-5.8/perl@24193
p4raw-branched: from //depot/perl@24186 'branch in' t/op/not.t
(@23960..)
p4raw-integrated: from //depot/perl@24186 'merge in' perly.y (@23900..)
p4raw-integrated: from //depot/perl@23960 'edit in' MANIFEST (@23954..)
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -712,7 +712,8 @@ term : termbinop { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); } | FUNC1 '(' ')' /* not () */ - { $$ = newOP($1, OPf_SPECIAL); } + { $$ = $1 == OP_NOT ? newUNOP($1, 0, newSVOP(OP_CONST, 0, newSViv(0))) + : newOP($1, OPf_SPECIAL); } | FUNC1 '(' expr ')' /* not($foo) */ { $$ = newUNOP($1, 0, $3); } | PMFUNC '(' term ')' /* split (/foo/) */ |