The C99 'z' format modifier does not appear to be implemented correctly.
A simple example to demonstrate...
#include <stdio.h> int main(const int argc, const char* argv[]) { printf("%zu\n", (size_t) -1); return 0; }
The expected would normally be,
18446744073709551615
for Windows 64bit.
The actual output is,
zu
Diff:
Hi Jason,
the behavior you see here is absolutely that one to be expected. By default mingw-w64's crt-headers are providing MS' variant of printf/scanf routines, which are indeed no compliant to gnu-ish variant you are testing here.
Nevertheless mingw-w64 provide a way to make use of the gnu-ish C99 printf/scanf routines, You either have to include libstdc++'s config-header (or one of its STL headers) it provides, or to make sure that the macro '__USE_MINGW_ANSI_STDIO' is defined with value '1' (please before including any c-runtime headers).
Hope this helps. I close this bug as works for me.