This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]