This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH,gfortran] Remove homegrown isdigit and isalpha in module.c
DJ Delorie wrote:
>>Modules are of course compiler-generated, but it would be safer and not much
>>more complicated to say
>> else if ('a' <= c <= 'z' || 'A' <= c <= 'Z')
> It would be wrong to do this. Of the two most popular charset
> encodings (ascii and ebcdic), only one (ascii) has the alphabet in
> sequence like that.
I spotted one more issues of this kind in primary.c, and considering DJ's
comment, I committed this as obvious after the obligatory bubblestrapping and
RCS file: /cvs/gcc/gcc/gcc/fortran/ChangeLog,v
retrieving revision 1.292
diff -u -p -r1.292 ChangeLog
--- ChangeLog 14 Jan 2005 11:55:04 -0000 1.292
+++ ChangeLog 15 Jan 2005 22:35:17 -0000
@@ -1,3 +1,8 @@
+2005-01-15 Tobias Schl"uter <email@example.com
+ * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
+ ASCII-like character encoding.
2005-01-14 Steven G. Kargl <firstname.lastname@example.org>
* resolve.c (compare_case): Cleanup.
RCS file: /cvs/gcc/gcc/gcc/fortran/primary.c,v
retrieving revision 1.15
diff -u -p -r1.15 primary.c
--- primary.c 3 Jan 2005 21:43:50 -0000 1.15
+++ primary.c 15 Jan 2005 22:35:18 -0000
@@ -1,5 +1,6 @@
/* Primary expression subroutines
- Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2004, 2005 Free Software Foundation,
Contributed by Andy Vaught
This file is part of GCC.
@@ -114,7 +115,7 @@ check_digit (int c, int radix)
- r = ('0' <= c && c <= '9') || ('a' <= c && c <= 'f');
+ r = ISXDIGIT (c);