size of wchar_t
Artem B. Bityuckiy
abityuckiy@yandex.ru
Fri Apr 2 14:34:00 GMT 2004
Eljay Love-Jensen wrote:
> Hi Artem,
>
> I've used this trick in the past:
>
> g++ -c -DWCHAR_BIT_SIZE=32 foo.cpp
>
> On some platforms it is 31 bit (sufficient for ISO 10646); but I use 32
> even in that case, thus I'm including the fallow bit. WCHAR_MAX will be
> 0x7FFFFFFFu on those platforms.
>
> g++ -c -DWCHAR_BIT_SIZE=16 -fshort-wchar foo.cpp
>
> I then use the WCHAR_BIT_SIZE to alter code behavior. Absence of
> WCHAR_BIT_SIZE causes a #error.
>
I'll think about this, thanks.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
More information about the Gcc-help
mailing list