🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #713

Re: sizeof in 36-bits machines

#713
From: Alan J Rosenthal
Date: Thu, 12 Oct 1989 23:20
17 lines
1054 bytes
dolf@idca.tds.PHILIPS.nl (Dolf Grunbauer) writes:

>Assuming a 36-bit integer (e.g. DEC-10 :-) and 8-bit bytes, what should
>`sizeof(int)' return: 4, 4.5 or 5 ?
...
>Or is it simply impossible to make a compliant ANSI C compiler for such
>machine/memory configuration ?

If your integers are 36 bits, you cannot choose 8 bits as a char size.  On the
dec-10, the natural choice would be 36 bit ints and 9 bit chars.  The byte
operations on the dec-10 make 9 bit and 8 bit chars equally easy, although the
native size of choice is 7 for packing reasons.

I think you'll find that word-addressed machines tend to have sophisticated
byte-grabbing operations which allow specification of the byte size.

ajr
Technical Details
Message-ID: <1989Oct12.192032.18896@jarvis.csri.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!dgp.toronto.edu!flaps
References: <272@ssp1.idca.tds.philips.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!dgp.toronto.edu!flaps
From: flaps@dgp.toronto.edu (Alan J Rosenthal)
Newsgroups: comp.std.c
Subject: Re: sizeof in 36-bits machines
Message-ID: <1989Oct12.192032.18896@jarvis.csri.toronto.edu>
Date: 12 Oct 89 23:20:33 GMT
References: <272@ssp1.idca.tds.philips.nl>
Lines: 17