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: ctype_members.cc broken when sizeof(mask) = 1


Richard Earnshaw wrote:

Can anybody suggest a solution?

I would suggest taking advantage of the Darwin experience (both compare config/os/bsd/darwin, config/locale/darwin and dig the archives for details and rationale, messages from Geoff in particular): you can definitely roll your own implementation of the ctype facilities.

_M_bit is just an implementation detail and assuming the provided size (16 bits) is not too small, it seems to me you can put it to good use anyway, or even leave it unused for your target (like darwin does, AFAICS).

Of course, at this stage it's not an option changing anything in the generic configuration or in the ctype<wchar_t> class layout, for obvious binary compatibility reasons (besides, 16 I would say is a "natural" choice given 11 or 12 (in the GNU model) property names)

Hope you will find the above useful...
Paolo.

PS: To partially answer your puzzlement about nobody noticing before, maybe libstdc++/23271 (newlib) is an interesting exception ;)


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