Date: Sun, 08 Jun 1997 05:29:29 +1000 From: David Nugent <davidn@unique.usn.blaze.net.au> To: Steve Howe <un_x@anchorage.net>, freebsd-hackers@freebsd.org Subject: Re: signed/unsigned cpp Message-ID: <199706071929.FAA28336@unique.usn.blaze.net.au> In-Reply-To: Your message of "Mon, 02 Jun 1997 22:21:16 PST." <Pine.BSF.3.95q.970602221732.5317A-100000@aak.anchorage.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 3 17:16:57 1997 > Received: from server.blaze.net.au (server.blaze.net.au [203.17.53.1]) > by unique.usn.blaze.net.au (8.8.5/8.8.5) with ESMTP id RAA17742 > for <davidn@labs.usn.blaze.net.au>; Tue, 3 Jun 1997 17:16:55 +1000 (EST) > Received: from y.physics.usyd.edu.au (y.physics.usyd.edu.au [129.78.129.110]) > by server.blaze.net.au (8.8.5/8.8.5) with ESMTP id RAA01818 > for <davidn@blaze.net.au>; Tue, 3 Jun 1997 17:17:11 +1000 (EST) > Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18]) by y.physics.usyd.edu.au (8.8.5/8.8.2) with ESMTP id RAA23900; Tue, 3 Jun 1997 17:14:22 +1000 (EST) > Received: from localhost (daemon@localhost) > by hub.freebsd.org (8.8.5/8.8.5) with SMTP id XAA10254; > Mon, 2 Jun 1997 23:35:03 -0700 (PDT) > Received: (from root@localhost) > by hub.freebsd.org (8.8.5/8.8.5) id XAA09994 > for hackers-outgoing; Mon, 2 Jun 1997 23:31:56 -0700 (PDT) > Received: from iceberg.anchorage.net. (root@iceberg.anchorage.net [207.14.72.150]) > by hub.freebsd.org (8.8.5/8.8.5) with SMTP id XAA09973 > for <hackers@freebsd.org>; Mon, 2 Jun 1997 23:31:52 -0700 (PDT) > Received: from aak.anchorage.net (ai-132 [207.14.72.132]) by iceberg.anchorage.net. (8.6.11/8.7.3) with SMTP id VAA10269 for <hackers@freebsd.org>; Mon, 2 Jun 1997 21:29:00 -0800 > Date: Mon, 2 Jun 1997 22:21:16 -0800 (AKDT) > From: Steve Howe <un_x@anchorage.net> > X-Sender: abc@aak.anchorage.net > To: freebsd-hackers <hackers@FreeBSD.ORG> > Subject: Re: signed/unsigned cpp > In-Reply-To: <199706030619.PAA01871@genesis.atrad.adelaide.edu.au> > Message-ID: <Pine.BSF.3.95q.970602221732.5317A-100000@aak.anchorage.net> > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > Sender: owner-hackers@FreeBSD.ORG > X-Loop: FreeBSD.org > Precedence: bulk > > On Tue, 3 Jun 1997, Michael Smith wrote: > > > No, there you are quite right. But if I use a "char *" type, I know > > not to explicitly expect it to be either "signed" or "unsigned". > > i'm in the middle of porting a bunch of code, and would like to do > it as "properly" as possible. can anyone tell me an instance > where declaring "char *" is of any benefit, as opposed to > explicitly defining "unsinged char *" or "signed char *" ? Backwards compatibility. Some code doesn't care about the signedness of whatever it is pointing at, and it simply won't have any impact. Only the fact that it is pointing at an object who's sizeof() is guaranteed to be 1 may matter, for the sake of doing pointer arithmetic, for example. In c++, the concept of "default signedness" is still there simply because it makes it possible to more easily compile existing C code in C++ mode. The addition of "signed" as an explicit type assists in tighter type checking. Regards, David David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freebsd.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706071929.FAA28336>