wide character issues with gcc 3.2
Benjamin Kosnik
bkoz@redhat.com
Fri Aug 23 10:42:00 GMT 2002
> 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
More information about the Libstdc++
mailing list