[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Relatively mild dev13 build problems
From: |
T.E.Dickey |
Subject: |
Re: lynx-dev Relatively mild dev13 build problems |
Date: |
Sun, 31 Oct 1999 13:50:52 -0500 (EST) |
>
> In a recent note, T.E.Dickey said:
>
> > Date: Sat, 30 Oct 1999 15:08:13 -0400 (EDT)
> >
> > > There's a bunch of isdigit() atc. and tolower() that should have
> > > their argument cast to (unsigned char)... (or use one of the lynx
> > > Klaus
> >
> > unsigned char -- or int? (I thought the latter was needed to appease the
> > compiler). It's a nuisance (I'd rather not cast the parameter to isdigit
> > if it's a char).
> >
> Any normal compiler should automatically convert among integral types.
should (but unfortunately someone snuck that behavior into an otherwise
useful compiler warning in gcc a while ago - so I just grit my teeth and
ride over the bumps)
> Whether the converted value is what the function expects at runtime
> is a different matter.
>
> Also a different matter is converson between (unsigned char *) and
> (char *). OS/390's compiler regards these as incompatible (even though
> the range of char values is [0 .. 255]. Arguments to the standard
> str*() functions must be (char *), not (unsigned char *), per ANSI.
The choice of whether char is signed or unsigned is implementation-dependent
afaik, and most C compilers don't recognize an explicit 'signed' qualifier.
So one compiler may warn, and others simply ignore the distinction.
>
> -- gil
> --
> StorageTek
> INFORMATION made POWERFUL
--
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey