Closed not-kaz closed 3 weeks ago
Yup, this is an upstream issue with Mingw-w64. Non-standard declarations in standard headers are not behind preprocessor conditions to hide them in such cases. (In general this sort of detail isn't so consistent outside of the Linux ecosystem.) I imagine there are some difficulties with doing so in conjunction with non-standard headers. If this was fixed, as of GCC 14 this wouldn't even be a warning but an error.
Unfortunately not much I can do in w64devkit aside from maintaining a huge patch to fix up the headers. (Besides, I personally don't think it's that important, and so not worth much effort.)
Fair enough, it's definitely not worth that kind of hassle. Thank you for the great explanation.
While using -Wall, -Wextra, -pedantic/-pedantic-errors and std=c99, expected behavior when using strnlen() would be a warning but it compiles without issue.