This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wide character issues with gcc 3.2


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]