Character types in ANSI C
meissner at dg_rtp.UUCP
meissner at dg_rtp.UUCP
Fri Feb 27 22:49:23 AEST 1987
In article <472 at myrias.UUCP> cg at myrias.UUCP (Chris Gray) writes:
>
> What exactly are the compatibility rules for character types in ANSI C?
> I.e. which of the following are legal:
>
> char *p1;
> unsigned char *p2;
> signed char *p3;
>
> p1 = p2; /* case 1 */
> p1 = p3; /* case 2 */
> p2 = p3; /* case 3 */
>
These are illegal. Even though the underlying bit representation may be
the same, they are different types. The same holds for pointers to int
and pointers to long on a machines where sizeof(int) == sizeof(long).
--
Michael Meissner, Data General Uucp: ...mcnc!rti-sel!dg_rtp!meissner
It is 11pm, do you know what your sendmail and uucico are doing?
More information about the Comp.lang.c
mailing list