[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 --- Comment #19 from Jonathan Wakely redi at gcc dot gnu.org --- Author: redi Date: Thu May 28 16:27:46 2015 New Revision: 223840 URL: https://gcc.gnu.org/viewcvs?rev=223840root=gccview=rev Log: Backport from mainline 2014-12-22 Jonathan Wakely jwak...@redhat.com PR libstdc++/37522 * include/bits/basic_string.h (stod, stof, stoi, stol, stold, stoll, stoul, stoull, to_string): Only use _GLIBCXX_HAVE_BROKEN_VSWPRINTF to guard definition of to_wstring. Modified: branches/gcc-4_9-branch/libstdc++-v3/ChangeLog branches/gcc-4_9-branch/libstdc++-v3/include/bits/basic_string.h
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 --- Comment #18 from Jonathan Wakely redi at gcc dot gnu.org --- Author: redi Date: Mon Dec 22 16:41:39 2014 New Revision: 219019 URL: https://gcc.gnu.org/viewcvs?rev=219019root=gccview=rev Log: PR libstdc++/37522 * include/bits/basic_string.h (stod, stof, stoi, stol, stold, stoll, stoul, stoull, to_string): Only use _GLIBCXX_HAVE_BROKEN_VSWPRINTF to guard definition of to_wstring. * testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc: Do not use dg-require-string-conversions. * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/ stoull.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/ to_string.cc: Likewise. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/basic_string.h trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/dr1261.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 Karlson2k k2k at narod dot ru changed: What|Removed |Added CC||k2k at narod dot ru --- Comment #16 from Karlson2k k2k at narod dot ru 2013-03-05 01:16:34 UTC --- Header version could be detected in _mingw_mac.h for MinGW-w64 or in _mingw.h for MinGW32. _mingw.h could be used for MinGW-w64 too as it include internally _mingw_mac.h.
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 --- Comment #17 from Karlson2k k2k at narod dot ru 2013-03-05 01:28:06 UTC --- Created attachment 29582 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29582 Proposed patch Possible patch for latest MinGW-w64. Patched GCC version: 4.7.2 Can be easy edited for trunk version. --- ./libstdc++-v3/config/os/mingw32-w64/os_defines.h.orig2011-12-23 21:23:38 +0400 +++ ./libstdc++-v3/config/os/mingw32-w64/os_defines.h2013-03-05 05:22:07 +0400 @@ -64,7 +64,10 @@ #define _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM 1 // See libstdc++/37522. +#include _mingw_mac.h +#if !defined (__MINGW64_VERSION_MAJOR) || (__MINGW64_VERSION_MAJOR 3) #define _GLIBCXX_HAVE_BROKEN_VSWPRINTF 1 +#endif // See libstdc++/43738 // On native windows targets there is no ioctl function. And the existing
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 Jason Merrill jason at gcc dot gnu.org changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #14 from Jason Merrill jason at gcc dot gnu.org 2013-01-25 21:36:48 UTC --- (In reply to comment #11) Don't open an new bug, don't reopen this bug. I assume you are using none-trunk version of mingw-w64, are you? If so, please switch to trunk-version. When exactly was this fixed on the trunk? The mingw32-headers package on Fedora 17 (2.0.999-0.8.trunk.20121016) still has this issue. (In reply to comment #13) No, it isn't. It is v2.x branch as written even in file-name. But please stop using gcc-bugreports to get answered your user-questions. Use mingw-w64's mailing-list instead. Often GCC works around problems with older versions of other tools; it seems reasonable to me to do the same in this case, especially since there isn't yet a release with this issue fixed.
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 --- Comment #15 from Kai Tietz ktietz at gcc dot gnu.org 2013-01-25 23:53:37 UTC --- Issue was fixed on trunk. As far as I know should rawhide Fedora have fixed that issue already. Nevertheless we could define the broken-vsprintf macro based on header-version. I will come up with a patch for that.
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 ph dunski koala01 at free dot fr changed: What|Removed |Added CC||koala01 at free dot fr --- Comment #10 from ph dunski koala01 at free dot fr 2013-01-19 11:34:35 UTC --- Hello, I know this bug is fixed since a long time, but there is the same problem when trying to compile the gcc-4.8-20130106.tar.bz2 tarball for mingw-w64. Same prolems having, usually same issues, adding the line // See libstdc++/37522. #define _GLIBCXX_HAVE_BROKEN_VSWPRINTF 1 in the libstdc++-v3/config/os/mingw32-w64/os_defines.h file seems to allow the build. Should i open a new bug, or can you take it in acount from here?
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 Kai Tietz ktietz at gcc dot gnu.org changed: What|Removed |Added CC||ktietz at gcc dot gnu.org --- Comment #11 from Kai Tietz ktietz at gcc dot gnu.org 2013-01-19 11:38:12 UTC --- (In reply to comment #10) Hello, I know this bug is fixed since a long time, but there is the same problem when trying to compile the gcc-4.8-20130106.tar.bz2 tarball for mingw-w64. Same prolems having, usually same issues, adding the line // See libstdc++/37522. #define _GLIBCXX_HAVE_BROKEN_VSWPRINTF 1 in the libstdc++-v3/config/os/mingw32-w64/os_defines.h file seems to allow the build. Should i open a new bug, or can you take it in acount from here? Don't open an new bug, don't reopen this bug. I assume you are using none-trunk version of mingw-w64, are you? If so, please switch to trunk-version.
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 --- Comment #12 from ph dunski koala01 at free dot fr 2013-01-19 11:47:08 UTC --- (In reply to comment #11) Don't open an new bug, don't reopen this bug. I assume you are using none-trunk version of mingw-w64, are you? If so, please switch to trunk-version. i'm using the version taken at http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v2.0.7.tar.gz/download . I think it is the trunk version, isn't it?
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522 --- Comment #13 from Kai Tietz ktietz at gcc dot gnu.org 2013-01-19 11:53:08 UTC --- (In reply to comment #12) (In reply to comment #11) Don't open an new bug, don't reopen this bug. I assume you are using none-trunk version of mingw-w64, are you? If so, please switch to trunk-version. i'm using the version taken at http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v2.0.7.tar.gz/download . I think it is the trunk version, isn't it? No, it isn't. It is v2.x branch as written even in file-name. But please stop using gcc-bugreports to get answered your user-questions. Use mingw-w64's mailing-list instead.
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
--- Comment #6 from jakub at gcc dot gnu dot org 2008-10-27 09:58 --- Any progress? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
--- Comment #7 from paolo dot carlini at oracle dot com 2008-10-27 10:09 --- Ok, I will just implement for now the minimal fix: _GLIBCXX_HAVE_BROKEN_VSWPRINTF defined in config/os/mingw32/os_define.h and used in basic_string.h -- paolo dot carlini at oracle dot com changed: What|Removed |Added AssignedTo|aaronavay62 at aaronwl dot |paolo dot carlini at oracle |com |dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
--- Comment #8 from paolo at gcc dot gnu dot org 2008-10-27 15:02 --- Subject: Bug 37522 Author: paolo Date: Mon Oct 27 15:01:28 2008 New Revision: 141382 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=141382 Log: 2008-10-27 Paolo Carlini [EMAIL PROTECTED] PR libstdc++/37522 * config/os/mingw32/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSWPRINTF * include/bits/basic_string.h: Guard string conversions with !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF) too. * testsuite/lib/libstdc++.exp (check_v3_target_string_conversions): New. * testsuite/lib/dg-options.exp (dg-require-string-conversions): New. * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc: Use the latter. * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/ stoull.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/ to_string.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc: Likewise. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/config/os/mingw32/os_defines.h trunk/libstdc++-v3/include/bits/basic_string.h trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc trunk/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/to_string.cc trunk/libstdc++-v3/testsuite/lib/dg-options.exp trunk/libstdc++-v3/testsuite/lib/libstdc++.exp -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
--- Comment #9 from paolo dot carlini at oracle dot com 2008-10-27 15:03 --- Fixed. -- paolo dot carlini at oracle dot com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
-- mmitchel at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
-- aaronavay62 at aaronwl dot com changed: What|Removed |Added CC||dannysmith at users dot ||sourceforge dot net OtherBugsDependingO||36216 nThis|| AssignedTo|unassigned at gcc dot gnu |aaronavay62 at aaronwl dot |dot org |com Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Known to fail||4.4.0 Known to work||4.3.2 Last reconfirmed|-00-00 00:00:00 |2008-09-14 23:27:34 date|| Target Milestone|--- |4.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
--- Comment #1 from dannysmith at users dot sourceforge dot net 2008-09-15 02:57 --- I guess the solution is to make libstdc++ use _vsnwprintf instead of vswprintf on *-mingw32. I think that is the most expedient solution. Would an inline redirection of vswprintf to _vsnwprintf in config/os/mingw32/os_define.h (later, if it gets fixed in mingw runtime that could be made conditional on mingw version) work? Danny -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522