The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: ron@ronnatalie.com (Ron Natalie)
Subject: [TUHS] origins of void* -- Apology!
Date: Wed, 8 Nov 2017 14:59:13 -0500	[thread overview]
Message-ID: <00dd01d358cc$0d42a340$27c7e9c0$@ronnatalie.com> (raw)
In-Reply-To: <CANCZdfpA1HDfvCOfU40Qx+EGdrj_r1OUb+Wgxa_Qcp-9uJekuA@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2043 bytes --]

The “story” was the reticence to require something that MIGHT take additional instructions.     Again, this stems from yet another overload of char, that of a small numeric type (many languages do not treat characters as integers).     The idea was to let char be the regular char type and if you were going to do math on it, you’d better explicitly state signed/unsigned, of course, people get sloppy leading to the bugs you noted.

 

 

From: TUHS [mailto:tuhs-bounces@minnie.tuhs.org] On Behalf Of Warner Losh
Sent: Wednesday, November 8, 2017 11:13 AM
To: Nemo
Cc: The Eunuchs Hysterical Society
Subject: Re: [TUHS] origins of void* -- Apology!

 

 

 

On Wed, Nov 8, 2017 at 9:07 AM, Nemo <cym224 at gmail.com> wrote:

On 6 November 2017 at 19:36, Ron Natalie <ron at ronnatalie.com> wrote:
> It’s worse than that.   “char” is defined as neither signed nor unsigned.
> The signedness is implementation defined.    This was why we have the inane
> “signed” keyword.

What was that story about porting an early UNIX to a machine with
different char polarity?  I dimly recall only a few problems.

 

Doesn't even have to be very early... There's lots of 'assume char is signed bugs' in even modern code. So many that ARM gave up on the idea that unsigned char was good (since the underlying ARM architecture supported it better) and their modern ABIs are all signed char. The other thing that EABI fixes is the crazy alignment rules that were out-of-step with the rest of the computer industry that broke a lot of networking and storage code on ARM because its rules caused structs that would otherwise describe the binary layout to be suddenly wrong. Yes, that is an implementation choice, just a poor one that was eventually corrected.

 

When I was working on FreeBSD/arm only a decade ago, I'd routinely hit both of these issues...

 

Warner

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20171108/0a653e9e/attachment-0001.html>


  reply	other threads:[~2017-11-08 19:59 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 16:07 Nemo
2017-11-08 16:12 ` Warner Losh
2017-11-08 19:59   ` Ron Natalie [this message]
2017-11-08 23:33   ` Steffen Nurpmeso
2017-11-09  1:35   ` Steve Johnson
2017-11-08 20:28 ` [TUHS] NUXI Problem Warren Toomey
2017-11-08 20:38   ` Ron Natalie
2017-11-08 20:39   ` Clem Cole
2017-11-08 23:14   ` Warren Toomey
  -- strict thread matches above, loose matches on Subject: below --
2017-11-07 15:34 [TUHS] origins of void* -- Apology! Nelson H. F. Beebe
2017-11-08 12:48 ` Tony Finch
2017-11-08 13:36   ` Otto Moerbeek
2017-11-08 16:03   ` Warner Losh
2017-11-06 15:02 [TUHS] origins of void* Warner Losh
2017-11-06 21:46 ` [TUHS] origins of void* -- Apology! Steve Johnson
2017-11-06 22:18   ` Warner Losh
2017-11-07  0:25   ` Ron Natalie
2017-11-07  0:34     ` Arthur Krewat
2017-11-07  0:36       ` Ron Natalie
2017-11-07  1:09     ` Bakul Shah
2017-11-07  1:55       ` Ron Natalie
2017-11-08 17:44       ` Ralph Corderoy
2017-11-08 19:56         ` Ron Natalie
2017-11-08 20:39           ` Don Hopkins
2017-11-08 20:42             ` Ron Natalie
2017-11-08 20:47               ` Don Hopkins
2017-11-08 20:48                 ` Don Hopkins
2017-11-08 20:43             ` Don Hopkins
2017-11-08 20:43             ` Clem Cole
2017-11-08 20:45             ` Warner Losh
2017-11-09  6:33               ` Lars Brinkhoff
2017-11-08 20:50           ` Steve Nickolas
2017-11-08 21:25         ` Bakul Shah
2017-11-09  6:37           ` Lars Brinkhoff
2017-11-09  7:14             ` Don Hopkins
2017-11-09  7:44               ` Lars Brinkhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00dd01d358cc$0d42a340$27c7e9c0$@ronnatalie.com' \
    --to=ron@ronnatalie.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).