Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 1997 17:37:51 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        un_x@anchorage.net (Steve Howe)
Cc:        msmith@atrad.adelaide.edu.au, hackers@FreeBSD.ORG
Subject:   Re: signed/unsigned cpp
Message-ID:  <199706020807.RAA20786@genesis.atrad.adelaide.edu.au>
In-Reply-To: <Pine.BSF.3.95q.970601234203.1753D-100000@aak.anchorage.net> from Steve Howe at "Jun 1, 97 11:47:50 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706020807.RAA20786>