Xref: utzoo comp.unix.xenix:2644 comp.sources.d:2439
Path: utzoo!attcan!uunet!oddjob!uwvax!rutgers!ucsd!ucbvax!decwrl!decvax!watmath!grand!rwwetmore
From: rwwetmore@grand.waterloo.edu (Ross Wetmore)
Newsgroups: comp.unix.xenix,comp.sources.d
Subject: Something's Broken: was ... Re: tgetent
Keywords: tgetent,core dump,sco,xenix,large model
Message-ID: <19789@watmath.waterloo.edu>
Date: 8 Jul 88 14:23:20 GMT
References: <54@libove.UUCP> <701@nod2sco> <3222@bigtex.uucp> <1033@ficc.UUCP>
Sender: daemon@watmath.waterloo.edu
Reply-To: rwwetmore@math.Uwaterloo.ca (Ross Wetmore)
Distribution: comp
Organization: U. of Waterloo, Ontario
Lines: 32

In article <1033@ficc.UUCP> peter@ficc.UUCP (Peter da Silva) writes:
>In article <3222@bigtex.uucp>, james@bigtex.uucp (James Van Artsdalen) writes:
>> IN article <701@nod2sco>, rosso@sco.COM (Ross Oliver) wrote:
>>>     - Don't use "0" to mean NULL ( i.e. (char *)0 ).
>> This last statement is incorrect, or rather, evidence of a broken
>> compiler.

>He's speaking in the context of a function call. Large model 286
>programs have 32 bit pointers but 16 bit integers, so if you pass
>0 to a function expecting a pointer the stack will be off by two
>bytes.

And large model '386 programs have 48 bit pointers and 32 bit ints ...

>So, the problem isn't a broken compiler, it's a broken CPU architecture.

>-- `-_-' Peter (have you hugged your wolf today) da Silva.
>--   U   Ferranti International Controls Corporation.

  The assumption that pointers and ints are of equal length is the 
problem, no? This is a fundamental assumption of the 'C' language, 
if not an explicit requirement.

  It would be unfair to fault either the architecture, or compiler in
this case. It just means the 'C' language was designed for a certain
class of hardware and thus has limited use in its pristine (unkludged) 
form.

Ross W. Wetmore                 | rwwetmore@water.NetNorth
University of Waterloo          | rwwetmore@math.Uwaterloo.ca
Waterloo, Ontario N2L 3G1       | {uunet, ubc-vision, utcsri}
(519) 885-1211 ext 3491         |   !watmath!rwwetmore