This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH,gfortran] Remove homegrown isdigit and isalpha in module.c
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 09 Jan 2005 22:30:30 +0100
- Subject: Re: [PATCH,gfortran] Remove homegrown isdigit and isalpha in module.c
- References: <20050109211543.GA5925@troutmask.apl.washington.edu>
Steve Kargl wrote:
> - case 'a':
> - case 'b':
> - case 'c':
> - case 'Y':
> - case 'Z':
> + }
> + else if (isalpha(c))
isalpha is locale-dependent, in my locale you will allow äöüÄÖÜß as well.
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')
I also think that inside gcc ISDIGIT (which comes from libiberty) is the
preferred spelling for isdigit.