@stahta01: I guess omlk wanted to point you to PRxNN macros, but he/she was so vague that I'm not sure he/she succeeded
Likely true; but, I have no idea if that would really be the clearest fix for third party code.
From MSys2 _mingw.h it seem to clearly imply my patch should either use __USE_MINGW_ANSI_STDIO equal 1 or use the PRxNN macros. Will have to further research. And, the problem seems to be MinGW64 instead of MSys2 based.
/* We are activating __USE_MINGW_ANSI_STDIO for various define indicators.
* printf ll modifier (unsupported by msvcrt.dll) is required by C99 and C++11 standards. */
#if (defined (_POSIX) || defined (_POSIX_SOURCE) || defined (_POSIX_C_SOURCE) \
|| defined (_ISOC99_SOURCE) \
|| (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && __MSVCRT_VERSION__ < 0xE00) \
|| (defined (__cplusplus) && __cplusplus >= 201103L && __MSVCRT_VERSION__ < 0xE00) \
|| defined (_XOPEN_SOURCE) || defined (_XOPEN_SOURCE_EXTENDED) \
|| defined (_GNU_SOURCE) \
|| defined (_SVID_SOURCE)) \
&& !defined(__USE_MINGW_ANSI_STDIO)
/* Enable __USE_MINGW_ANSI_STDIO if user did _not_ specify it explicitly... */
# define __USE_MINGW_ANSI_STDIO 1
#endif
/* We are defining __USE_MINGW_ANSI_STDIO as 0 or 1 */
#if !defined(__USE_MINGW_ANSI_STDIO)
#define __USE_MINGW_ANSI_STDIO 0 /* was not defined so it should be 0 */
#elif (__USE_MINGW_ANSI_STDIO + 0) != 0 || (1 - __USE_MINGW_ANSI_STDIO - 1) == 2
#define __USE_MINGW_ANSI_STDIO 1 /* was defined as nonzero or empty so it should be 1 */
#else
#define __USE_MINGW_ANSI_STDIO 0 /* was defined as (int)zero and non-empty so it should be 0 */
#endif
Edit: Decided to build using 32 bit MinGW64 to see if I get any warning like when using 64 bit.
Then try using non MSys2 GCC 64 bit and confirm the problem exists outside of MSys2 GCC.
Likely try the PRxNN macros based fix because it should be less complex to maintain; still not sure it is better long term.
But, when you have two choices the simpler one is the one to pick if you have no idea which is better.
Tim S.