summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorLarry Wall <larry@wall.org>1998-10-23 18:00:41 +0000
committerLarry Wall <larry@wall.org>1998-10-23 18:00:41 +0000
commit834a4ddd8309fbf6aabbbc51bb6fcbe056e7963f (patch)
tree10dce2532e7be7538af0c19f5a7d7f73c9220e55 /pp.c
parent62b1ebc20082e645ed8e8a0cc6c1ebf91577cd34 (diff)
downloadperl-834a4ddd8309fbf6aabbbc51bb6fcbe056e7963f.tar.gz
Program with utf8 identifiers fails to compile
p4raw-id: //depot/perl@2038
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index 9d9ad5c50d..14c8a25461 100644
--- a/pp.c
+++ b/pp.c
@@ -1316,6 +1316,10 @@ PP(pp_negate)
sv_setsv(TARG, sv);
*SvPV_force(TARG, len) = *s == '-' ? '+' : '-';
}
+ else if (IN_UTF8 && *(U8*)s >= 0xc0 && isIDFIRST_utf8(s)) {
+ sv_setpvn(TARG, "-", 1);
+ sv_catsv(TARG, sv);
+ }
else
sv_setnv(TARG, -SvNV(sv));
SETTARG;