From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32486 invoked by alias); 15 Sep 2008 17:12:13 -0000 Received: (qmail 31059 invoked by uid 48); 15 Sep 2008 17:10:48 -0000 Date: Mon, 15 Sep 2008 17:12:00 -0000 Message-ID: <20080915171048.31058.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/37522] [4.4 regression] Incorrect vswprintf prototype breaks __to_xstring In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "paolo dot carlini at oracle dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-09/txt/msg01784.txt.bz2 ------- 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