Re: CURRENT: bc -e results in empty string/result

From: Stefan Eßer <se_at_freebsd.org>
Date: Sun, 5 Jul 2020 11:25:21 +0200
Am 04.07.20 um 11:50 schrieb Hartmann, O.:
> On Fri, 3 Jul 2020 17:58:27 +0200
> Stefan Eßer <se_at_freebsd.org> wrote:
>> From the bc man-page:
>>
>>  The quit statement causes bc(1) to quit, even if it is on a branch
>> that will not be executed (it is a compile-time command).
>>
>>  The halt statement causes bc(1) to quit, if it is executed. (Unlike
>>  quit if it is on a branch of an if statement that is not executed,
>>  bc(1) does not quit.)
>>
>> This behavior is identical to that of GNU bc:
>>
>> $ echo "6582031 - 1048576 - 0 - 409600 - 1024 - 40 - 4096; quit " |
>> gbc $ echo "6582031 - 1048576 - 0 - 409600 - 1024 - 40 - 4096; halt "
>> | gbc 5118695
> 
> Hello.
> 
> Unfortunately, there was no remark in UPDATING and in the hurry I did
> not find any traces of the change, so it hit me since several scripts
> failed. As a workaround, it helped to replace "-e quit" by "-e halt",
> although this might semantically also an unfortunate way to do.

Hi Oliver,

you are right to point out that the change would have been worth
an entry in UPDATING! (... which I'm going to belatedly add, now)

I had submitted an entry for the quarterly report, but UPDATING is
the first place that I'd consult, in case of such an unexpected
change, too.

The author of the new bc has changed the semantics of -e to those
of the FreeBSD version, since he is very interested in providing
an implementation that covers all relevant GNU and FreeBSD features
and extensions.

The new version is already waiting to be committed in my source
tree, I'm just waiting for the go-ahead from the author, who runs
fuzzing tests for several days before tagging a new release version
(the regression tests run in less than a minute and did all pass,
including one for the FreeBSD -e behavior, of course ;-) ).

I'll expect the new version with the fix to be tagged on Monday
afternoon (local time) and will then update the sources in base
and the port.

Best regards, STefan
Received on Sun Jul 05 2020 - 07:25:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:24 UTC