Re: printf inconsistent results for %.0f

2024-09-20 Thread Chet Ramey
On 9/19/24 1:39 AM, Stephane Chazelas wrote: Looks like printf(3) gets called with a `Lf' conversation specifier and a double argument. Yes, I came to the same conclusion with an essentially identical fix. [...] Would it be possible to have a 5.2 patch released with the backport of those two

Re: printf inconsistent results for %.0f

2024-09-18 Thread Stephane Chazelas
2024-08-14 09:11:05 -0400, Chet Ramey: > On 8/13/24 7:05 PM, Grisha Levit wrote: > > On Mon, Aug 12, 2024, 11:04 Chet Ramey > > wrote: > > > > My question is why the (admittedly old) gnulib replacement > > strtod/strtold > > is messing things up. > > > > > >

Re: printf inconsistent results for %.0f

2024-08-14 Thread Chet Ramey
On 8/13/24 7:05 PM, Grisha Levit wrote: On Mon, Aug 12, 2024, 11:04 Chet Ramey > wrote: My question is why the (admittedly old) gnulib replacement strtod/strtold is messing things up. Looks like printf(3) gets called with a `Lf' conversation specifier and a

Re: printf inconsistent results for %.0f

2024-08-13 Thread Grisha Levit
On Mon, Aug 12, 2024, 11:04 Chet Ramey wrote: > My question is why the (admittedly old) gnulib replacement strtod/strtold > is messing things up. > Looks like printf(3) gets called with a `Lf' conversation specifier and a double argument. diff --git a/builtins/printf.def b/builtins/printf.def i

Re: printf inconsistent results for %.0f

2024-08-12 Thread Chet Ramey
On 8/12/24 10:30 AM, Laur Aliste wrote: Bash Version: 5.2 Patch Level: 21 Release Status: release Description: One of my old script that's been in use for 10+ years is using built-in bash printf for rounding float value to int via `printf`; as of today (Aug 12) it started returni

Re: printf inconsistent results for %.0f

2024-08-12 Thread Greg Wooledge
On Mon, Aug 12, 2024 at 16:30:26 +0200, Laur Aliste wrote: > Configuration Information: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -g -O2 -Werror=implicit-function-declaration > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -fcf-pr

printf inconsistent results for %.0f

2024-08-12 Thread Laur Aliste
Configuration Information: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -Werror=implicit-function-declaration -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall uname output: Linux p14s 6.9.12-amd64 #1 SMP PREEMPT_DYNAM