This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [libstdc++-v3 patch] Fix invalid use of signed wchar_t and unsigned wchar_t in <type_traits>
- From: "Doug Gregor" <doug dot gregor at gmail dot com>
- To: "Paolo Carlini" <pcarlini at suse dot de>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 30 Jun 2007 09:47:02 -0400
- Subject: Re: [libstdc++-v3 patch] Fix invalid use of signed wchar_t and unsigned wchar_t in <type_traits>
- References: <24b520d20706291348i249ab08bq22c88f5c5c0e055d@mail.gmail.com> <4685944D.5050902@suse.de>
On 6/29/07, Paolo Carlini <pcarlini@suse.de> wrote:
> IIRC, wchar_t cannot be marked signed or unsigned, but this is what
> the C++0x type_traits header in libstdc++ is doing. The errors I'm
> getting are:
[snip errors]
> The fix is to remove those specializations. Patch follows. Tested on
> cxx0x-branch (where it actually gets tested). Okay for mainline?
Before going ahead, I would ask you to clarify the issue a bit more,
which, put this way seems to me a little mysterious. For example, is the
mainline compiler rejecting 'signed wchar_t' and 'unsigned wchar_t'? If
not, why not? What is going on in the branch that exposes the failure?
Is that something C++0x-specific?
It's not C++0x-specific. The mainline compiler will complain about
unsigned/signed wchar_t, but only with -pedantic. Otherwise, it
silently ignores the "signed" or "unsigned" part.
Apparently, this header never gets compiled with -pedantic on mainline.
The cxx0x-branch is different because everything runs in C++0x mode
so <type_traits> ends up getting included with -pedantic in some tests
and we see the error.
- Doug