Tomas Frydrych wrote:
> I have noticed code like this in the Wordperfect importer:
>
>     afunction(UT_uint32 * pN);
>     ...
>     wchar_t c;
>     afunction(&c);
>
> This assumes sizeof(wchar_t) == sizeof(UT_uint32). However,
> sizeof(wchar_t) varies on different systems, so this is not portable.

I might put some (more "to the metal") info here.

IAFAIK GCC C++ compiler treats them as 32-bit entities, and the Microsoft
MSVC compiler(s) treat them as 16-bit entities, making them inherently
uncompatible.

So much for making a "standard"... :-/

In reality, wchar_t is useless for cross platform work. If you remember that
you'll have no problem with it (since you won't be using it).

/Mike

Reply via email to