This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: wide character issues with gcc 3.2
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: "Anthony Feick" <afeick at hotmail dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Fri, 23 Aug 2002 10:35:48 -0700
- Subject: Re: wide character issues with gcc 3.2
- Organization: Red Hat / San Francisco
- References: <F54UW4HE92pfrGkLEu8000033e8@hotmail.com>
> I did this, but now I get a segfault in stl_alloc.h :
[snip]
> Unfortunately, I don't have a 'simple' test case for this.
Hmm. Well. Sorry to have misled you. It seems as if '-fshort-wchar' is
probably not the best way to go about solving your problem. The standard
C++ library has required instantiations for wchar_t, and as a result
some of the wchar_t specializations for required types and objects use
C99 functions that call down into the "C" library, which of course is
assuming a 4 byte wchar_t type on linux.
Instead, perhaps a better way to solve this problem would be to create a
user-defined type, and then instantiate std::basic_string with it,
instead of trying to force wchar_t into two bytes. Here's an example of how to
do this:
http://gcc.gnu.org/ml/libstdc++/2002-08/msg00236.html
-benjamin