This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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,gfortran] Remove homegrown isdigit and isalpha in module.c


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

I also think that inside gcc ISDIGIT (which comes from libiberty) is the
preferred spelling for isdigit.

- Tobi


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