Bug 247742

Summary: /usr/bin/bc: -e quit results in empty result
Product: Base System Reporter: O. Hartmann <ohartmann>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not A Bug    
Severity: Affects Many People    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description O. Hartmann 2020-07-03 16:01:54 UTC
The follwoing expression doesn't work on recent CURRENT (FreeBSD 13.0-CURRENT #78 r362787: Mon Jun 29 20:53:22 CEST 2020 amd64 and FreeBSD 13.0-CURRENT #83 r362913: Fri Jul  3 17:21:30 CEST 2020 amd64 as well):

# bc -e '6582031 - 1048576 - 0 - 409600 - 1024 - 40 - 4096' -e '5000 - 1' -e quit
#

and with -e halt:

#  bc -e '6582031 - 1048576 - 0 - 409600 - 1024 - 40 - 4096' -e '5000 - 1' -e halt
# 5118695
# 4999

as expected. Last known good was  FreeBSD 13.0-CURRENT #64 r362651: Fri Jun 26 17:05:42 CEST 2020 amd64.
Comment 1 O. Hartmann 2020-07-03 18:41:02 UTC
It appears I didn't realise that bc(1) has been switched to another source.