[libstdc++-v3 patch] Fix invalid use of signed wchar_t and unsigned wchar_t in <type_traits>
Paolo Carlini
pcarlini@suse.de
Sat Jun 30 00:17:00 GMT 2007
Hi Doug,
> 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:
>
> In file included from
> /Volumes/scratch/dgregor/gcc0x-install/lib/gcc/powerpc-apple-darwin8.9.0/4.3.0/../../../../include/c++/4.3.0/functional:66,
>
> from
> /Volumes/scratch/dgregor/gcc0x/gcc/testsuite/g++.old-deja/
> g++.other/headers1.C:30:
> /Volumes/scratch/dgregor/gcc0x-install/lib/gcc/powerpc-apple-darwin8.9.0/4.3.0/../../../../include/c++/4.3.0/type_traits:361:
>
> error: long, short, signed or unsigned used invalidly for '__type'
> /Volumes/scratch/dgregor/gcc0x-install/lib/gcc/powerpc-apple-darwin8.9.0/4.3.0/../../../../include/c++/4.3.0/type_traits:440:
>
> error: long, short, signed or unsigned used invalidly for '__type'
>
> 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?
Paolo.
More information about the Libstdc++
mailing list