Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!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: <1242@dg_rtp.UUCP> Date: Sat, 28-Feb-87 14:55:29 EST Article-I.D.: dg_rtp.1242 Posted: Sat Feb 28 14:55:29 1987 Date-Received: Sun, 1-Mar-87 17:20:10 EST References: <816@cullvax.UUCP> Reply-To: meissner@dg_rtp.UUCP (Michael Meissner) Organization: Data General (Languages @ Research Triangle Park, NC.) Lines: 23 In article <816@cullvax.UUCP> drw@cullvax.UUCP (Dale Worley) writes: > cg@myrias.UUCP (Chris Gray) writes: > > 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 */ > > Well, the char's are all widened into the 'appropriate' int types. > (These are called integral promotions, or some such.) Then the > appropriate comparisons of int's and/or unsigned int's are performed. Ughh, the above example is assigning pointers, not the items pointed to. Assigning pointers to different types (modulo const/volatile) is illegal in ANSI. Widening has nothing to do with it. -- Michael Meissner, Data General Uucp: ...mcnc!rti-sel!dg_rtp!meissner It is 11pm, do you know what your sendmail and uucico are doing?