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