This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs, casting the argument of eg isalpha to an int...
- To: Manfred Hollstein <manfred at s-direktnet dot de>
- Subject: Re: egcs, casting the argument of eg isalpha to an int...
- From: Kamil Iskra <kamil at dwd dot interkom dot pl>
- Date: Sun, 15 Feb 1998 17:24:31 +0100 (CET)
- cc: egcs at cygnus dot com
- Reply-To: Kamil Iskra <iskra at student dot uci dot agh dot edu dot pl>
On Sat, 14 Feb 1998, Manfred Hollstein wrote:
> the following cast sequence would be better:
>
> my_isalpha ((int) ((unsigned char) 'A'));
> my_isalpha ((int) ((unsigned char) 'ä'));
>
> This gives:
>
> 65, 'A'
> 228, 'ä'
But why the explicit cast from unsigned char to int? The following should
be enough:
my_isalpha ((unsigned char) 'A');
my_isalpha ((unsigned char) 'ä');
/ Kamil Iskra AmigaOS Linux/i386 Linux/m68k \
| GeekGadgets GCC maintainer UNIX system administrator |
| iskra@student.uci.agh.edu.pl kiskra@ernie.icslab.agh.edu.pl |
\ kamil@dwd.interkom.pl http://student.uci.agh.edu.pl/~iskra /