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: [Patch] Clean up and reformat to config/numeric and time


Martin Sebor wrote:

Interesting. This is quite similar to our own implementation (we
also store the wchar_t representation internally, just as glibc
appears to, but we store it in int32_t for better portability).

Hummm...


Just a quick observation (it may or may not be relevant): the
cast might be important if wchar_t is not the same size as int,
e.g., with -fshort-wchar. But if this code is tied to glibc
where wchar_t is always the same size as int (and if libstdc++
doesn't allow -fshort-wchar) it should be safe.

Indeed, this specific file if for the 'gnu' locale model, the one exploiting un underlying glibc, where, as you says, wchar_t is always the same size as int (this clean up started from this observation, indeed!)

Paolo.


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