LIU Hao wrote:
> But that's not standard behavior. I think we're too late for such changes; 
> people who have been used to
> the standard behavior would be annoyed.

Those %C and %S format specifiers are not part of standard C; they are however 
part of Single Unix Specification, and correspond to %lc and %ls respectively. 
IMO, there are zero reasons why anyone would use them in portable code since we 
have standardized %lc and %ls for this purpose.

POSIX specification for printf: 
https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html

Microsoft's printf functions also support %C and %S with incompatible meaning.
See 
https://learn.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions.

Standard-conforming code should never use %C and %S since this is undefined 
behavior, so I don't really see compatibility issues here. IMO, providing 
consistent Microsoft behavior among all CRTs is a compatibility improvement.

- Kirill Makurin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to