summaryrefslogtreecommitdiff
path: root/profile.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-10-16 10:27:27 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-10-16 10:27:27 +0300
commit1a09783dc80ab0af7d27d3cd00512165d5daf629 (patch)
tree6c87624843676a8943101249ab432fabb9c7020a /profile.c
parent6b3f460c7f70d3cb0fac0fb45188b2a7776d653e (diff)
parent2d63bc3ee2a686560d29e1eb7b433deb45fd7619 (diff)
downloadgawk-1a09783dc80ab0af7d27d3cd00512165d5daf629.tar.gz
Merge branch 'master' into feature/typed-regex
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/profile.c b/profile.c
index 21bda844..21d563e5 100644
--- a/profile.c
+++ b/profile.c
@@ -464,10 +464,13 @@ cleanup:
case Op_field_spec:
case Op_field_spec_lhs:
case Op_unary_minus:
+ case Op_unary_plus:
case Op_not:
t1 = pp_pop();
if (is_binary(t1->type)
- || (((OPCODE) t1->type) == pc->opcode && pc->opcode == Op_unary_minus))
+ || (((OPCODE) t1->type) == pc->opcode
+ && (pc->opcode == Op_unary_minus
+ || pc->opcode == Op_unary_plus)))
pp_parenthesize(t1);
/* optypes table (eval.c) includes space after ! */
@@ -1207,6 +1210,7 @@ prec_level(int type)
return 13;
case Op_unary_minus:
+ case Op_unary_plus:
case Op_not:
return 12;
@@ -1293,6 +1297,7 @@ is_scalar(int type)
case Op_postincrement:
case Op_postdecrement:
case Op_unary_minus:
+ case Op_unary_plus:
case Op_not:
return true;