Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!mit-eddie!genrad!decvax!tektronix!uw-beaver!ubc-vision!alberta!myrias!cg From: cg@myrias.UUCP Newsgroups: comp.lang.c Subject: Character types in ANSI C Message-ID: <472@myrias.UUCP> Date: Fri, 13-Feb-87 19:44:07 EST Article-I.D.: myrias.472 Posted: Fri Feb 13 19:44:07 1987 Date-Received: Thu, 19-Feb-87 05:57:26 EST Organization: Myrias Research, Edmonton Lines: 30 If this is a duplicate, I apologize, our poster was broken. 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 */ I see three choices: a) they are all legal b) they are all illegal c) case 3) and one of cases 1) and 2) are illegal, depending on whether the implementation treats 'char' as signed or unsigned. I've currently implemented choice c), but am concerned that this will result in programs that compile on some implementations and not others (and vice versa). Several of us have argued about it here, but we can't find anything solid in the draft. Any definitive answers would be appreciated. Thanks in advance. Chris Gray {ubc-vision,sask,ihnp4}!alberta!myrias!cg