wide character issues with gcc 3.2
Anthony Feick
afeick@hotmail.com
Tue Aug 20 01:14:00 GMT 2002
Gcc 3.2 on linux compiles and links our app, but -fshort-wchar doesn't seem
to be working completely. The compiler directive 'L' converts character
strings properly, and wchar_t is the right size. The problem is that
"basic_string<wchar_t>" still thinks everything is 4-bytes.
basic_string<wchar_t> foo = L"foo";
foo[0] is 'f'
foo[1] is 'o'
foo[2] is uninitialized
also
basic_string<wchar_t> bar;
bar.push_back((wchar_t)'b');
bar.push_back((wchar_t)'a');
bar.push_back((wchar_t)'r');
bar.c_str[0] is 'b'
bar.c_str[1] is 0
bar.c_str[2] is 'a'
bar.c_str[3] is 0
bar.c_str[4] is 'r'
bar.c_str[5] is 0
$ gcc -v
Reading specs from
/home/shared/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/home/shared/local
--enable-shared --enable-threads=posix --enable-__cxa_atexit
Thread model: posix
gcc version 3.2
***************************************************************
Also, GCC 3.2 on FreeBSD doesn't have definitions for wide character string
functions (towlower, towupper, ...). There is a "cwctype" in
"local/include/c++/3.2/", but including it doesn't do anything.
$ gcc -v
Reading specs from
/home/shared/local/lib/gcc-lib/i386-unknown-freebsd4.5/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/home/shared/local
--enable-threads=posix --with-gnu-ld --with-ld=/home/shared/local/bin/ld
--with-gnu-as --with-as=/home/shared/local/bin/as
Thread model: posix
gcc version 3.2
***************************************************************
If anyone can help me with either of these problems I would greatly
appreciate it. If there is a better mailing list to send this to, let me
know.
-Tony
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
More information about the Gcc
mailing list