[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "printf %d ''" should diagnose the empty string
From: |
#!microsuxx |
Subject: |
Re: "printf %d ''" should diagnose the empty string |
Date: |
Tue, 19 Nov 2024 22:05:49 +0100 |
On Tue, Nov 19, 2024, 10:04 PM #!microsuxx <fxmbsw7@gmail.com> wrote:
> the printf %d gets to be no print_out at all
> u specify a %<code> but no arg
> means it wont try printf at all smth
>
> printf %d '' we can talk about
> returns 0
> and looks normal so to me
>
sorry i missed u already did right
sorry ..
u can try posix mode if u care
i .. like it not erroring
On Tue, Nov 19, 2024, 8:46 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
>
>> Configuration Information [Automatically generated, do not change]:
>> Machine: x86_64
>> OS: linux-gnu
>> Compiler: gcc -std=gnu23
>> Compilation CFLAGS: -g -O2
>> uname output: Linux penguin.cs.ucla.edu 6.11.6-200.fc40.x86_64 #1 SMP
>> PREEMPT_DYNAMIC Fri Nov 1 16:09:34 UTC 2024 x86_64 GNU/Linux
>> Machine Type: x86_64-pc-linux-gnu
>>
>> Bash Version: 5.3
>> Patch Level: 0
>> Release Status: beta
>>
>> Description:
>>
>> printf doesn't diagnose attempts to print empty strings as numbers. This
>> doesn't conform to POSIX and disagrees with the traditional Unix printf
>> command.
>>
>> Repeat-By:
>>
>> printf %d ''
>>
>> This should behave like "printf %d ' '", and should output a diagnostic
>> and exit with status 1; instead it silently exits with status 0.
>>
>> Fix:
>> Attached.
>
>
- "printf %d ''" should diagnose the empty string, Paul Eggert, 2024/11/19
- Re: "printf %d ''" should diagnose the empty string, #!microsuxx, 2024/11/19
- Re: "printf %d ''" should diagnose the empty string,
#!microsuxx <=
- Re: "printf %d ''" should diagnose the empty string, Paul Eggert, 2024/11/19
- Re: "printf %d ''" should diagnose the empty string, Martin D Kealey, 2024/11/20
- Re: "printf %d ''" should diagnose the empty string, Chet Ramey, 2024/11/20
- Re: "printf %d ''" should diagnose the empty string, Paul Eggert, 2024/11/20
- Re: "printf %d ''" should diagnose the empty string, Martin D Kealey, 2024/11/21
- Re: "printf %d ''" should diagnose the empty string, Paul Eggert, 2024/11/21
- Re: "printf %d ''" should diagnose the empty string, Martin D Kealey, 2024/11/22
- Re: "printf %d ''" should diagnose the empty string, Chet Ramey, 2024/11/22