This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: ctype_members.cc broken when sizeof(mask) = 1
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Richard Earnshaw <Richard dot Earnshaw at buzzard dot freeserve dot co dot uk>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 24 May 2006 01:10:22 +0200
- Subject: Re: ctype_members.cc broken when sizeof(mask) = 1
- References: <200605232151.k4NLpYdg005231@merlin.buzzard.freeserve.co.uk>
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 ;)