[TUHS] v7 K&R C

Derek Fawcus dfawcus+lists-tuhs at employees.org
Mon May 18 02:10:55 AEST 2020

On Fri, May 15, 2020 at 10:31:38PM +0100, Richard Tobin wrote:
>   "The implementation shall define char to have the same range,
>   representation, and behavior as either signed char or unsigned char."
>   - C99
> (Technically it's a separate type from both of them.)

I was about to suggest I'd yet to come across a compiler which
handled them that way, but on checking I find that both clang
and gcc do now in effect have 3 types.

i.e. both 'unsigned char *' and 'signed char *' values passed to
a function taking 'char *' raises a warning.

I wonder when they started doing that?


More information about the TUHS mailing list