* Re: wide character issues with gcc 3.2
@ 2002-08-20 10:44 Benjamin Kosnik
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Kosnik @ 2002-08-20 10:44 UTC (permalink / raw)
To: gcc, afeick
> 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.
libstdc++@gcc.gnu.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* wide character issues with gcc 3.2
@ 2002-08-20 1:14 Anthony Feick
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Feick @ 2002-08-20 1:14 UTC (permalink / raw)
To: gcc
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-20 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-20 10:44 wide character issues with gcc 3.2 Benjamin Kosnik
-- strict thread matches above, loose matches on Subject: below --
2002-08-20 1:14 Anthony Feick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).