This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH/RFA] Internationalize ctype functionality
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: vinschen at redhat dot com
- Cc: newlib at sourceware dot org
- Date: Wed, 1 Apr 2009 14:38:08 +0200
- Subject: Re: [PATCH/RFA] Internationalize ctype functionality
- Reply-to: hp at gcc dot gnu dot org
> 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.