public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
@ 2008-09-14 23:26 aaronavay62 at aaronwl dot com
2008-09-14 23:28 ` [Bug libstdc++/37522] " aaronavay62 at aaronwl dot com
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: aaronavay62 at aaronwl dot com @ 2008-09-14 23:26 UTC (permalink / raw)
To: gcc-bugs
When attempting a bootstrap including libstdc++-v3, the following error will be
encountered.
libtool: compile: /mingw/src/gccf/./gcc/xgcc -shared-libgcc
-B/mingw/src/gccf/./gcc -nostdinc++
-L/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/src
-L/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/src/.libs
-L/mingw/src/gccf/i386-pc-mingw32/winsup/mingw
-L/mingw/src/gccf/i386-pc-mingw32/winsup/w32api/lib -isystem
/mingw/src/svn/winsup/mingw/include -isystem
/mingw/src/svn/winsup/w32api/include -B/mingw/i386-pc-mingw32/bin/
-B/mingw/i386-pc-mingw32/lib/ -isystem /mingw/i386-pc-mingw32/include -isystem
/mingw/i386-pc-mingw32/sys-include
-I/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include/i386-pc-mingw32
-I/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include
-I/mingw/src/svn/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra
-Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -g -O2 -std=gnu++0x -c
../../../../svn/libstdc++-v3/src/functexcept.cc -DDLL_EXPORT -DPIC -o
.libs/functexcept.o
In file included from
/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include/string:58,
from
/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include/stdexcept:44,
from ../../../../svn/libstdc++-v3/src/functexcept.cc:31:
/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include/bits/basic_string.h: In
function 'std::wstring std::to_wstring(long long int)':
/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include/bits/basic_string.h:2675:
error: no matching function for call to '__to_xstring(int (*)(wchar_t*, const
wchar_t*, char*), unsigned int, const wchar_t [5], long long int&)'
/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include/bits/basic_string.h: In
function 'std::wstring std::to_wstring(long long unsigned int)':
/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include/bits/basic_string.h:2681:
error: no matching function for call to '__to_xstring(int (*)(wchar_t*, const
wchar_t*, char*), unsigned int, const wchar_t [5], long long unsigned int&)'
/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include/bits/basic_string.h: In
function 'std::wstring std::to_wstring(long double)':
/mingw/src/gccf/i386-pc-mingw32/libstdc++-v3/include/bits/basic_string.h:2689:
error: no matching function for call to '__to_xstring(int (*)(wchar_t*, const
wchar_t*, char*), const int&, const wchar_t [4], long double&)'
make[4]: *** [functexcept.lo] Error 1
The problem is that MSVCRT's prototype for vswprintf is incorrect, and differs
from the standard C version. This may not be easy to fix in mingwrt. However,
the _vsnwprintf function has the correct prototype and works with __to_xstring.
I guess the solution is to make libstdc++ use _vsnwprintf instead of vswprintf
on *-mingw32.
--
Summary: [4.4 regression] Incorrect vswprintf prototype breaks
__to_xstring
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: build
Severity: major
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aaronavay62 at aaronwl dot com
GCC target triplet: *-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
@ 2008-09-14 23:28 ` aaronavay62 at aaronwl dot com
2008-09-15 2:59 ` dannysmith at users dot sourceforge dot net
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: aaronavay62 at aaronwl dot com @ 2008-09-14 23:28 UTC (permalink / raw)
To: gcc-bugs
--
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|0000-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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
2008-09-14 23:28 ` [Bug libstdc++/37522] " aaronavay62 at aaronwl dot com
@ 2008-09-15 2:59 ` dannysmith at users dot sourceforge dot net
2008-09-15 17:12 ` paolo dot carlini at oracle dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2008-09-15 2:59 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
2008-09-14 23:28 ` [Bug libstdc++/37522] " aaronavay62 at aaronwl dot com
2008-09-15 2:59 ` dannysmith at users dot sourceforge dot net
@ 2008-09-15 17:12 ` paolo dot carlini at oracle dot com
2008-09-15 17:36 ` paolo dot carlini at oracle dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-09-15 17:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2008-09-15 17:10 -------
I think Danny's solution should work. The inline redirection would live in
namespace std, and os_defines.h would also define something like
_GLIBCXX_HAVE_BROKEN_VSWPRINTF which would be used in include/*/cwchar to not
import the broken function as-is from the global namespace to namespace std.
In principle, this brokeness can be easily detected at configure-time and we
could (should!) add a separate check for vswprintf, on the parameters too, in
GLIBCXX_ENABLE_WCHAR_T, following a strategy similar to the separate checks we
have in GLIBCXX_ENABLE_C99. But then, I'm not sure what do with it, if we use
it in include/*/cwchar to not import the broken function as-is in namespace
std, then the function will disappear also for targets not providing a
replacement, as mingw will do... Opinions about this? Is it likely, bound to be
a big problem? Because I'd rather prefer having the configure-time check.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
` (2 preceding siblings ...)
2008-09-15 17:12 ` paolo dot carlini at oracle dot com
@ 2008-09-15 17:36 ` paolo dot carlini at oracle dot com
2008-09-16 0:16 ` aaronavay62 at aaronwl dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-09-15 17:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paolo dot carlini at oracle dot com 2008-09-15 17:34 -------
Well, in principle the automatic configure-time check could define a
_GLIBCXX_HAVE_CONFORMING_VSWPRINTF, checking the parameters too, and then
os_defines.h could define a _GLIBCXX_HAVE_REPLACEMENT_VSWPRINTF. Then,
include/*/cwchar could guard the import with something like:
#if defined(_GLIBCXX_HAVE_CONFORMING_VSWPRINTF) ||
!defined(_GLIBCXX_HAVE_REPLACEMENT_VSWPRINTF)
... import
#endif
Anyway, if you can do and test somehow the mingw specific bits in os_defines.h,
I can do the rest.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
` (3 preceding siblings ...)
2008-09-15 17:36 ` paolo dot carlini at oracle dot com
@ 2008-09-16 0:16 ` aaronavay62 at aaronwl dot com
2008-09-16 0:23 ` paolo dot carlini at oracle dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: aaronavay62 at aaronwl dot com @ 2008-09-16 0:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from aaronavay62 at aaronwl dot com 2008-09-16 00:14 -------
Paolo, I'll give it a try and if I can't get the configury to work for me, I'll
let you do that part.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
` (4 preceding siblings ...)
2008-09-16 0:16 ` aaronavay62 at aaronwl dot com
@ 2008-09-16 0:23 ` paolo dot carlini at oracle dot com
2008-10-22 3:34 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-09-16 0:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from paolo dot carlini at oracle dot com 2008-09-16 00:22 -------
Great, the configury should be in fact pretty easy.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
` (5 preceding siblings ...)
2008-09-16 0:23 ` paolo dot carlini at oracle dot com
@ 2008-10-22 3:34 ` mmitchel at gcc dot gnu dot org
2008-10-27 10:00 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-10-22 3:34 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37522
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
` (6 preceding siblings ...)
2008-10-22 3:34 ` mmitchel at gcc dot gnu dot org
@ 2008-10-27 10:00 ` jakub at gcc dot gnu dot org
2008-10-27 10:11 ` paolo dot carlini at oracle dot com
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-10-27 10:00 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
` (7 preceding siblings ...)
2008-10-27 10:00 ` jakub at gcc dot gnu dot org
@ 2008-10-27 10:11 ` paolo dot carlini at oracle dot com
2008-10-27 15:03 ` paolo at gcc dot gnu dot org
2008-10-27 15:04 ` paolo dot carlini at oracle dot com
10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-10-27 10:11 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
` (8 preceding siblings ...)
2008-10-27 10:11 ` paolo dot carlini at oracle dot com
@ 2008-10-27 15:03 ` paolo at gcc dot gnu dot org
2008-10-27 15:04 ` paolo dot carlini at oracle dot com
10 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu dot org @ 2008-10-27 15:03 UTC (permalink / raw)
To: gcc-bugs
------- 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=gcc&view=rev&rev=141382
Log:
2008-10-27 Paolo Carlini <paolo.carlini@oracle.com>
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
` (9 preceding siblings ...)
2008-10-27 15:03 ` paolo at gcc dot gnu dot org
@ 2008-10-27 15:04 ` paolo dot carlini at oracle dot com
10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-10-27 15:04 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-10-27 15:04 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-14 23:26 [Bug libstdc++/37522] New: [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring aaronavay62 at aaronwl dot com
2008-09-14 23:28 ` [Bug libstdc++/37522] " aaronavay62 at aaronwl dot com
2008-09-15 2:59 ` dannysmith at users dot sourceforge dot net
2008-09-15 17:12 ` paolo dot carlini at oracle dot com
2008-09-15 17:36 ` paolo dot carlini at oracle dot com
2008-09-16 0:16 ` aaronavay62 at aaronwl dot com
2008-09-16 0:23 ` paolo dot carlini at oracle dot com
2008-10-22 3:34 ` mmitchel at gcc dot gnu dot org
2008-10-27 10:00 ` jakub at gcc dot gnu dot org
2008-10-27 10:11 ` paolo dot carlini at oracle dot com
2008-10-27 15:03 ` paolo at gcc dot gnu dot org
2008-10-27 15:04 ` paolo dot carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).