Date: Tue, 3 Jun 1997 15:49:02 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: un_x@anchorage.net (Steve Howe) Cc: hackers@FreeBSD.ORG Subject: Re: signed/unsigned cpp Message-ID: <199706030619.PAA01871@genesis.atrad.adelaide.edu.au> In-Reply-To: <Pine.BSF.3.95q.970602212800.5129F-100000@aak.anchorage.net> from Steve Howe at "Jun 2, 97 09:40:41 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Steve Howe stands accused of saying: > > > > > It isn't only a portability issue, but also a c++ standards issue. > > c++ distinguishes between these three types. Ansi c only has two > > and there it *is* a portability issue as to whether char* is signed > > or unsigned. This is one of the many ambiguities that c++ has the > > luxury to resolve. :) > > i hate to carry on anything trivial ... but, > > having a "default signedness" seems like trouble to me. when you > are writing code, you should have some intentions for a signedness. > imho, c++ should've just kept 2 types of signedness and made sure > one or the other was always specified - then you wouldn't have > the kludge of "whatever some other compiler deems it to be". > i can't imagine a worthwhile use of that. Then I suggest that you hang around for a few more years, and get work on a few more platforms under your belt. In time, you will probably appreciate the distinction well enough. > if i am using an "unsigned char *", i expect my code to use an > "unsigned char *". it does not benefit any cross-compiler > or any other architecture to say "no - i will use it as > a signed char *". > > but i have been wrong before :) 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". -- ]] 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?199706030619.PAA01871>