From owner-freebsd-hackers Mon Jun 2 01:08:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id BAA06427 for hackers-outgoing; Mon, 2 Jun 1997 01:08:09 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id BAA06422 for ; Mon, 2 Jun 1997 01:08:06 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id RAA20786; Mon, 2 Jun 1997 17:37:51 +0930 (CST) From: Michael Smith Message-Id: <199706020807.RAA20786@genesis.atrad.adelaide.edu.au> Subject: Re: signed/unsigned cpp In-Reply-To: from Steve Howe at "Jun 1, 97 11:47:50 pm" To: un_x@anchorage.net (Steve Howe) Date: Mon, 2 Jun 1997 17:37:51 +0930 (CST) Cc: msmith@atrad.adelaide.edu.au, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Steve Howe stands accused of saying: > On Sun, 1 Jun 1997, Michael Smith wrote: > > > Because neither is equivalent to the "default" signedness. > > > > const char * is _not_ equivalent to const unsigned char *, or const > > signed char *. > > i would appreciate it if you could explain further - why? > any char * can _only_ be signed or unsigned, even if it's > the default that makes it so. ? 'char' has three types of signedness; "signed", "unsigned" and "default". Signed and unsigned are obvious. Default means "use whatever is the default on this platform". Thus, for portable code signed != unsigned != default. -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[