[PATCH/RFA] Internationalize ctype functionality

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Wed Apr 1 13:15:00 GMT 2009

> Date: Wed, 1 Apr 2009 10:23:44 +0200
> From: Corinna Vinschen <vinschen@redhat.com>

> The __set_ctype function is called for every target which has
> _MB_CAPABLE set.

So presumably having __ctype_ptr__ const for other targets is
ok, like in the patch I sent.

>  If you constify __ctype_ptr__, you would disallow the
> __set_ctype functionality for every !ALLOW_NEGATIVE_CTYPE_INDEX target.
> Please note that the actual character class arrays are still const.
> Only the pointer used in the ctype functions isn't.

Of course, but by having it non-const gcc can't optimize on
knowing that it can't validly point to any modifiable object.

brgds, H-P
PS. No, I'm not sure gcc does that.

More information about the Newlib mailing list