Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!mcnc!rti-sel!dg_rtp!meissner From: meissner@dg_rtp.UUCP Newsgroups: comp.lang.c Subject: Re: Character types in ANSI C Message-ID: <1223@dg_rtp.UUCP> Date: Fri, 27-Feb-87 07:49:23 EST Article-I.D.: dg_rtp.1223 Posted: Fri Feb 27 07:49:23 1987 Date-Received: Sun, 1-Mar-87 12:22:02 EST References: <472@myrias.UUCP> Reply-To: meissner@dg_rtp.UUCP (Michael Meissner) Organization: Data General (Languages @ Research Triangle Park, NC.) Lines: 20 In article <472@myrias.UUCP> cg@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?