On 2017/6/12 23:24, Martell Malone wrote: > In this thread https://sourceforge.net/p/mingw-w64/bugs/459/ > there is a suggested fix for print with whole numbers > > The builtin __mingw_printf is inconsistent with printf on %a format. >> I think __mingw_printf is wrong, because obviously 1.0 != 0x0p-63. > > > vacaboja opened an issue on msys2 for this > https://github.com/msys2/msys2/issues/35 > and suggested a fix of removing the case to int > here is a patch that does just that. > According to the discussion on that ticket, this patch looks correct.
But why was there such a suspicious cast? It might be there to silence a warning about comparison between signed and unsigned integers, which is enabled by `-Wsign-compare` or `-Wall` in C++ or `-Wextra` in C. If you do see such a warning, I suggest you 1) redeclare `c` as `unsigned` instead of `int`, or 2) cast `c` back to `unsigned` before the comparison. -- Best regards, LH_Mouse ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
