On 2017/11/9 15:46, David Lee wrote:
Thanks for the reply.

You are welcome. :>

(1) Your observation seems to apply to the whole *wprintf() family
(fwprintf(), swprintf(), etc), not just wprintf().

It seems so. I am not clear how libstdc++ is making use if these functions. If they didn't even go into libstdc++ headers, that macro should probably not be pre-defined I think. Notwithstanding standard conformance, backward compatibility with legacy code should be kept. If the standard says "%ls" but MS says "%s" then we had better let the user make the choice hence pre-defining it is pretty bad. You might want to file a bug to libstdc++.

(2) On Windows with gcc/g++:
     (a) If I need to migrate some C code (using broken *wprintf()) into C++, 
and
     (b) the inclusion of stdio.h is to be changed to cstdio and/or
cwchar (so *wprintf() are no longer broken),

     Then the format specifiers are something to watch for.
Yes. stdio functions should be thoroughly tested.


Regards,

David Lee



------------------------------------------------------------------------------
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

Reply via email to