[PATCH] sim: use character classes rather than ranges

Joseph S. Myers joseph@codesourcery.com
Mon Mar 19 11:52:00 GMT 2012


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

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gdb-patches mailing list