Bug 21986 – pragma(printf) warns about valid but non-portable specifiers

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2021-05-29T03:00:10Z
Last change time
2024-12-13T19:16:44Z
Assigned to
No Owner
Creator
Paul Backus
Moved to GitHub: dmd#19937 →

Comments

Comment #0 by snarwin+bugzilla — 2021-05-29T03:00:10Z
As of DMD 2.096.1, compiling the following program results in a deprecation message: --- import core.stdc.stdio; void main() { printf("%'d", 123456789); // Deprecation: format specifier `"%'"` is invalid } --- The cause is the `'` (apostrophe) used as a flag in the format specifier, which is not one of the flag characters specified in the C99 standard. However, it is supported on some POSIX platforms, including Linux with glibc. It would be preferable if deprecation messages for non-portable format specifiers were suppressed when compiling for a platform that is known to support them.
Comment #1 by robert.schadek — 2024-12-13T19:16:44Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19937 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB