On Mon, 27 Apr 2020 03:49:00 +0200, Bernd Oppolzer wrote: >First of all, char in C is a subtype of int, >which means that you can do normal arithmetic operations to chars >and that chars are allowed in int expressions without special action >needed. > >for example: > >char c; > >c = 'A' + 1; /* c will be 'B' */ >c = c - 'A' + 'a'; /* c will now be 'b' - lower case */ > Agreed. Yet no such compatibility exists among unsigned char *, signed char *, and char*. However, many implementations quietly ignore violations of this. I encountered this on IBM mainframe when a FOSS program attempted to call a (standard, such as strlen()?) function expecting a char * argument with an unsigned char *.
The intrinsic type of "XYZ" here is char *, not unsigned char *, and surely not signed char *. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
