Enrico Forestieri wrote:
> I investigated the problem and it turned out that qt is innocent here.
> Indeed, looking at the preprocessed output I find:
>
> # 38
> #
"/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/ctype_base.h"
> # 3
> struct ctype_base
> {
>
> typedef const int* __to_type;
>
>
>
> typedef char mask;
> static const mask upper = 01;
> static const mask lower = 02;
> static const mask alpha = 01 | 02;
> static const mask digit = 04;
> static const mask xdigit = 0100 | 04;
> static const mask space = 010;
> static const mask print = 020 | 01 | 02 | 04 | 0200;
> static const mask graph = 020 | 01 | 02 | 04;
> static const mask cntrl = 040;
> static const mask punct = 020;
> static const mask alnum = 01 | 02 | 04;
> };
>
> The reason I was not seeing the warning before is that I was compiling
> using -funsigned-char.
You should have told that you used different compiler flags, and I would not
have blaimed qt :-) But that means that your STL is broken. It should not
generate a compiler warning here.
> Now I was trying to see if that was still
> necessary and thus I get the warning. BTW, it seems that -funsigned-char
> is no more needed. Indeed, the following test program does the right
> thing.
As I told you. Forcing a different signedness than default is asking for
trouble. With -funsigned-char you were probably hiding the bug I fixed in
revision 16212 (or a similar one where a char was converted to a char_type
or vice versa without encoding conversion).
Georg