Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

wchar_t override

6 views
Skip to first unread message

David

unread,
Dec 13, 2016, 6:54:59 PM12/13/16
to
Hello,

Is there a compiler override to treat wchar_t as a unsigned short (or as a
number and not a special type) ?

Thanks.

Paul S. Person

unread,
Dec 14, 2016, 12:53:09 PM12/14/16
to
It is defined in several header files as:

typedef unsigned short wchar_t;

so it appears is already is an unsigned short.

So far as the compiler itself is concerned, I would expect (but do not
know for a fact) that it treats wchar_t exactly as it does unsigned
short. The /library/, of course, uses wchar_t liberally, but that is
not the same thing.

What problem are you actually trying to solve?
--
"Nature must be explained in
her own terms through
the experience of our senses."

Johann Klammer

unread,
Jan 19, 2017, 11:25:46 AM1/19/17
to
On 12/14/2016 06:53 PM, Paul S. Person wrote:
>
> It is defined in several header files as:
>
> typedef unsigned short wchar_t;
>
> so it appears is already is an unsigned short.
>
> So far as the compiler itself is concerned, I would expect (but do not
> know for a fact) that it treats wchar_t exactly as it does unsigned
> short. The /library/, of course, uses wchar_t liberally, but that is
> not the same thing.
>
> What problem are you actually trying to solve?
>
maybe it's about the different types of wchar_t on different systems.
I think it was the utf16 (BMP) on windows for a while, but utf32 on linux,
and then the windows folks may have switched too, or something...


Paul S. Person

unread,
Jan 19, 2017, 12:45:42 PM1/19/17
to
In the absense of a response from the OP, I guess we will never know.

David

unread,
Apr 5, 2017, 8:40:02 PM4/5/17
to
I don't recall the issue, but no issues exist so it must have been another
issue <g>

"Paul S. Person" wrote in message
news:4pu18ctprpmfp2qef...@4ax.com...
0 new messages