]>
Commit | Line | Data |
---|---|---|
0be0c9ee AM |
1 | From 08897b5c5facfd35aa971321a248e6fcd6abf5d8 Mon Sep 17 00:00:00 2001 |
2 | From: "Arnold D. Robbins" <arnold@skeeve.com> | |
3 | Date: Sat, 21 Oct 2017 20:59:19 +0300 | |
4 | Subject: [PATCH] Don't fold constant strings if either is translatable. | |
5 | ||
6 | --- | |
7 | awkgram.y | 3 ++- | |
8 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
9 | ||
10 | diff --git a/awkgram.y b/awkgram.y | |
11 | index 1a75e64..9f35143 100644 | |
12 | --- a/awkgram.y | |
13 | +++ b/awkgram.y | |
14 | @@ -1589,7 +1589,8 @@ common_exp | |
15 | ||
16 | // 1.5 "" # can't fold this if program mucks with CONVFMT. | |
17 | // See test #12 in test/posix.awk. | |
18 | - if ((n1->flags & (NUMBER|NUMINT)) != 0 || (n2->flags & (NUMBER|NUMINT)) != 0) | |
19 | + // Also can't fold if one or the other is translatable. | |
20 | + if ((n1->flags & (NUMBER|NUMINT|INTLSTR)) != 0 || (n2->flags & (NUMBER|NUMINT|INTLSTR)) != 0) | |
21 | goto plain_concat; | |
22 | ||
23 | n1 = force_string(n1); | |
24 | -- | |
25 | 2.9.5 | |
26 |