Subject: Re: bug#74427: tests/printf/printf-indexed failure on macOS

From: Pádraig Brady <[email-masked]>
Date: Tue, 19 Nov 2024 21:54:59 +0000

On 19/11/2024 21:48, Paul Eggert wrote:
> On 2024-11-19 12:28, Pádraig Brady wrote:
>> But one could consider an empty argument as completely converted?
> 
> No, because POSIX says the argument must be a C integer constant, and
> empty strings are not C integer constants. Similar reasoning applies for
> floating point specs like %g, where POSIX says the argument is converted
> as if by strtod, and for an empty string POSIX says no conversion is
> performed by strtod.
> 
> 
>> For example scripts with `printf '%d\n' "$int"` will start erroring if int is not defined
> 
> It shouldn't be that big a deal, as the change doesn't affect stdout.
> The only issues are stderr and exit status, and that sort of script
> typically ignores both.
> 

OK assuming all the above, the NEWS change looks good.

thanks!
Pádraig