[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"printf %d ''" should diagnose the empty string
From: |
Paul Eggert |
Subject: |
"printf %d ''" should diagnose the empty string |
Date: |
Tue, 19 Nov 2024 11:46:25 -0800 |
User-agent: |
Mozilla Thunderbird |
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.
0001-diagnose-attempts-to-printf-as-a-number.patch
Description: Text Data
- "printf %d ''" should diagnose the empty string,
Paul Eggert <=
- Re: "printf %d ''" should diagnose the empty string, #!microsuxx, 2024/11/19
- Re: "printf %d ''" should diagnose the empty string, #!microsuxx, 2024/11/19
- 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