Subject: Re: NetBSD/pdp10 ?
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 03/07/2002 13:15:42
> > I THOUGHT C required that all data pointers be the same size,
> 
> No.  In particular, on machines whose addressing unit is larger than a
> char, pointers to objects smaller than an addressing unit (usually only
> char *, and perforce void *) are larger than pointers to objects that
> are whole addressing units in size.

They are definitely likely to have different encodings...

> > OTOH this breaks so much code,
> 
> Only code that's already broken (and perhaps whose brokenness just
> hasn't yet been noticed).

I was thinking that 'fixing' every use of calloc(), and bzero()
to ensure that '0' (null pointer) is explicitely assigned to 
every pointer is probably an overhead we can manage without?

OTOH some of the definitions of NIL, NULL etc are extremely
dubious - and need to be checked.

Casting function pointers to void * is rather more dangerous,
but usually safer than casting them to int or long.
(is intptr_t mandatory?)

	David

-- 
David Laight: david@l8s.co.uk