On 01.02.2015 4:21, JonY wrote: > On 2/1/2015 08:56, LRN wrote: >> Possible fixes: >> A) Make "%z" the primary, fix libgomp (gcc) to explicitly decorate >> gomp_fatal and gomp_fatal_va as gnu_printf. When compiled without a >> gnu-compatible vfprintf, it will behave incorrectly at runtime, when a gmp >> error happens. >> B) Make printf the primary, fix libgomp (gcc) to use different format >> strings depending on the host. According to [1], the right format for size_t >> for MS CRT is "Iu". This could be a configure-time check, compile a bunch of >> test programs with different format strings for size_t with -Werror, see >> which one works. >> C) Force libgomp to be compiled with __USE_MINGW_ANSI_STDIO defined to 1. >> This might not sit well with non-mingw SDKs that compile gcc (sounds >> weird...). >> > > I think the last option is the path of least resistance, make > configure.ac check if mingw* host and then use __USE_MINGW_ANSI_STDIO if so.
Now that i'm thinking of it, this will probably not fix the warning. It will guarantee that libgomp works correctly at runtime by ensuring that mingw-w64 printf implementation is used, but compile-time format check is determined by the printf format attribute of the function, and i doubt that gcc is smart enough to figure out that the implementation is gnu-compatible. So (C) will have to be combined with (A) for the warning to go away. -- O< ascii ribbon - stop html email! - www.asciiribbon.org
0x922360B0.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public