stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Zhong" <sco...@roguewave.com>
Subject RHAS 4u4 gcc 3.4.6 ctype.narrow failed assertion
Date Wed, 16 May 2007 00:09:07 GMT
RHAS 4u4 gcc 3.4.6 ctype.narrow failed assertion

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