This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] sim: use character classes rather than ranges


On Monday 19 March 2012 07:52:08 Joseph S. Myers wrote:
> On Mon, 19 Mar 2012, Mike Frysinger wrote:
> > A-Z ranges don't work in all locales, so use character classes instead.
> 
> Are these patterns really meant to depend on the user's locale (and
> support locale-specific letters) or are they related to the checked-in
> source code (in which case they should support just ASCII letters and
> digits - either the relevant program should be run in the C locale, or as
> in GCC's option-handling awk scripts the full sets of letters and digits
> should be given explicitly somewhere)?
> 
> (Using character classes like you do is fine - *if* either the user's
> locale is correct for this code or the programs explicitly run in the C
> locale.)

some are meant for processing source files which get checked in while others 
are processing user flags.  the gennltvals.sh script could be made to work by 
forcing a C locale, but the configure script would be tricky.

these changes might over match input if the processed source is wrong, but for 
all correct inputs, these groups should give the same output regardless of 
locale which is why i didn't try going the mess-with-active-locale route.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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