Path: utzoo!attcan!uunet!peregrine!ccicpg!cci632!rit!tropix!moscom!ur-valhalla!uhura.cc.rochester.edu!sunybcs!rutgers!mcnc!spl From: spl@mcnc.org (Steve Lamont) Newsgroups: comp.lang.c Subject: Re: What's a C expert? Message-ID: <4724@alvin.mcnc.org> Date: 22 Jul 89 21:34:59 GMT References: <12214@well.UUCP> <6057@microsoft.UUCP> <4722@alvin.mcnc.org> <25999@amdcad.AMD.COM> Reply-To: spl@mcnc.org.UUCP (Steve Lamont) Distribution: all Organization: Microelectronics Center of NC; RTP, NC Lines: 24 In article <25999@amdcad.AMD.COM> tim@amd.com (Tim Olson) writes: >In article <4722@alvin.mcnc.org> spl@mcnc.org.UUCP (Steve Lamont) writes: >| In article <6057@microsoft.UUCP> paulc@microsoft.UUCP (Paul Canniff 2/1011) writes: > [various and sundry bits deleted] >Chars are not necessarily signed by default. Many implementations make >chars unsigned. This is the reason why the "signed" keyword was added >to ANSI C. > >Having the sign of chars be undefined allows the implementation to be as >efficient as possible with respect to converting between chars and ints. Huh? Are you telling us that the standard *allows* such a horrible thing? Aaaaaaarrrrrgh! :-+ (<-- smiley sucking on a persimmon) I thought the standard was supposed to clarify things, not confuse the issue. It's almost like saying that a declaration of int may be either signed or unsigned. Makes for somewhat unpredictable behavior and/or some fairly verbose defensive coding... -- spl Steve Lamont, sciViGuy EMail: spl@ncsc.org North Carolina Supercomputing Center Phone: (919) 248-1120 Box 12732/RTP, NC 27709