[TUHS] origins of void* -- Apology!

Warner Losh imp at bsdimp.com
Thu Nov 9 02:12:50 AEST 2017


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/568e164a/attachment.html>


More information about the TUHS mailing list