This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: [PATCH/RFA] Internationalize ctype functionality


> 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.


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