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: V3 PATCH: numeric_limits<> support, fix PR/3865


Gabriel Dos Reis wrote:-

> | > wchar_t is a keyword in C++, how do you easily test its signness with
> | > if(0 or #if at compile-time and having that information in accordance
> | > with the compiler's own idea?
> | 
> | if (L'\0' - 1 < 0)
> |    wchar_t_is_signed;
> | else
> |    wchar_t_is_unsigned;
> 
> That doesn't work with -fshort-wchar.

It should do.

> Also, that assumes CPP uses (or emulates) the target's integer system
> to do calculations. Is that the case?  

Yes.

Neil.


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