stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: RHAS 4u4 gcc 3.4.6 ctype.narrow failed assertion
Date Wed, 23 May 2007 17:25:44 GMT
Scott Zhong wrote:
> RHAS 4u4 gcc 3.4.6 ctype.narrow failed assertion

I'm not sure I follow what you're trying to tell us here. What
problem are you pointing out? A bug in the test itself or one
in the library? If you feel there is a problem in the ctype
facet a better way to explain it would be to put together
a small isolated test case.

Martin

> 
> There are specific char values that fails widen narrow conversion in the
> 22.locale.cytpe.narrow test.
> 
> http://scottzroguewave.bravehost.com/22.locale.ctype.narrow.cpp 
> 
> Below shows values that narrow_chars and narrow_out differ after line
> 615 on 22.locale.ctype.narrow.cpp with this function:
> 
> for(int k = 0; k < sizeof narrow_chars; k++)
>             {
>                int a = (reinterpret_cast<unsigned
> char*>(narrow_chars))[k];
>                int b = (reinterpret_cast<unsigned
> char*>(narrow_out))[k];
>                if (a != b)
>                rw_info(0,0,__LINE__,"narrow_chars: %i, narrow_out: %i",
> a, b);
>             }
> 
> Output:
> 
> # TEXT: narrow_chars: 96, narrow_out: 166
> # TEXT: narrow_chars: 97, narrow_out: 168
> # TEXT: narrow_chars: 164, narrow_out: 172
> # TEXT: narrow_chars: 125, narrow_out: 180
> # TEXT: narrow_chars: 126, narrow_out: 184
> # TEXT: narrow_chars: 82, narrow_out: 188
> # TEXT: narrow_chars: 83, narrow_out: 189
> # TEXT: narrow_chars: 120, narrow_out: 190
> 
> Yu (Scott) Zhong


Mime
View raw message