bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Misoptimisation: _"A" "B" to _"AB"


From: arnold
Subject: Re: [bug-gawk] Misoptimisation: _"A" "B" to _"AB"
Date: Sat, 21 Oct 2017 11:22:18 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

What a great catch!  :-)

Thanks for the report. I'll work on it.

Arnold

Harald van Dijk <address@hidden> wrote:

> Hi all,
>
> Trying the new gawk 4.2.0 where optimisations are enabled by default, I 
> spot a test failure in the gettext test suite, which can be reduced 
> simply to
>
>      { print _"A" "B" }
>
> When optimisations are disabled, this translates "A", and adds "B" to it.
>
> When optimisations are enabled, this first adds "B" to "A", and then 
> translates "AB". Which is likely to fail.
>
> The previous version of gawk behaved the same way, but because 
> optimisations were disabled by default, it didn't really come up.
>
> awkgram.y contains code to disable early concatenation if either operand 
> is a number. I believe this should be extended to also disable early 
> concatenation if either operand is translatable.
>
> Cheers,
> Harald van Dijk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]