This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2008 17:10:48 -0000
- Subject: [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring
- References: <bug-37522-8837@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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