halyavin added inline comments.

================
Comment at: lib/CMakeLists.txt:113
+  add_library_flags(msvcrt) # C runtime startup files
+  add_library_flags(iso_stdio_wide_specifiers)
+endif()
----------------
EricWF wrote:
> halyavin wrote:
> > EricWF wrote:
> > > smeenai wrote:
> > > > Maybe add a comment explaining the purpose of this one as well?
> > > Not sure what the comment should read. I originally implemented this 
> > > patch without this library, but during testing it generated a undefined 
> > > reference to `___PLEASE_LINK_WITH_iso_stdio_wide_specifiers.lib`.  So 
> > > should the comment read "MSVC told me to link this"?
> > From very few hits Google gave me, it looks like this library implements 
> > proper behavior for %s and %c in printfw/scanfw-like functions. 
> That would make sense since the undefined symbols were in `locale.cpp`.  I 
> guess I'll update the comment to say "# required for wide character 
> formatting (e.g. `printfw`/`scanfw`)"
It is required for **correct** wide character formatting functions. Hence the 
ISO in the name. They were previously implemented incorrectly and this library 
fixes this (probably just flips a switch between legacy and correct behavior).


https://reviews.llvm.org/D28441



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to