On 11.12.2020 13:08, Liu Hao wrote:
在 2020/12/11 18:26, Christer Solskogen 写道:
While compiling the mingw-w64 cross compiler I got this with gcc-10.2.0:

(... snip ...)

Is this a gcc problem or mingw-w64 problem? Or perhaps "my" problem if I've 
configured something
wrongly.
mingw-w64 is from the latest v8.x branch.


This error is caused by the new behavior of stdio format specifiers. Now when 
compiling with at
least C99 or C++11 standard, mingw-w64 stdio functions are enabled by default 
(unless suppressed by
defining `__USE_MINGW_ANSI_STDIO` to zero) so `PRId64` now expands to `lld` 
instead of the old
MS-specified `I64d`. libgomp has the `printf` format attribute so its 
diagnostic functions do not
recognize standard specifiers and cause errors.

A patch for GCC 10 is available here [1].


[1]
https://github.com/msys2/MINGW-packages-dev/blob/68b5075842e2d13191f31a8619dfb262d73beb6a/mingw-w64-gcc-git/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch


Thank you for the explanation!

--
chs



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to