On Sat, 23 Sep 2017, Jacek Caban wrote:
Hi Martin,
On 9/23/17 4:50 PM, Martin Storsjö wrote:
--- a/mingw-w64-crt/crt/pseudo-reloc.c
+++ b/mingw-w64-crt/crt/pseudo-reloc.c
@@ -145,11 +145,13 @@ __report_error (const char *msg, ...)
#else
va_list argp;
va_start (argp, msg);
+ /* Intentionally avoid optimizing fprintf with a constant
+ * string into fwrite, to ease ucrtbase_compat.c. */
# ifdef __MINGW64_VERSION_MAJOR
- fprintf (stderr, "Mingw-w64 runtime failure:\n");
+ fprintf (stderr, "Mingw-w64 runtime failure%c\n", ':');
vfprintf (stderr, msg, argp);
# else
- fprintf (stderr, "Mingw runtime failure:\n");
+ fprintf (stderr, "Mingw runtime failure%c\n", ':');
vfprintf (stderr, msg, argp);
That doesn't look like a right way to avoid those optimization. How about
using -fno-builtin-fprintf instead? I think it's safe to assume that whole
mingwex could be built with this flag.
Sure, that works as well, and reduces the risk for the same issue
elsewhere as well.
// Martin
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public