ctype_members.cc broken when sizeof(mask) = 1

Paolo Carlini pcarlini@suse.de
Tue May 23 23:09:00 GMT 2006


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 ;)



More information about the Libstdc++ mailing list