🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #751

Re: sizeof in 36-bits machines

#751
From: Michael Meissner
Date: Sat, 14 Oct 1989 16:50
20 lines
1469 bytes
In article <272@ssp1.idca.tds.philips.nl> 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 ?
>  I know 4.5 is not valid, because pANSI states that the type of `sizeof' is
>  `size_t' (unsigned integral), but on the other hand 4 is too small and
>  5 too big.
>  Or is it simply impossible to make a compliant ANSI C compiler for such
>  machine/memory configuration ?

The above implementation is not legal ANSI C, since ANSI C (in the
environment section, I think, but I don't my a copy of the draft at
home) mandates that each object must be an integral number of bytes.
In the case of the DEC-10, you would use 9-bit bytes.
--

Michael Meissner, Data General.				If compiles where much
Uucp:		...!mcnc!rti!xyzzy!meissner		faster, when would we
Internet:	meissner@dg-rtp.DG.COM			have time for netnews?
Technical Details
Message-ID: <MEISSNER.89Oct14125043@tiktok.rtp.dg.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!uvaarpa!mcnc!rti!xyzzy!meissner
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!mailrus!ames!haven!uvaarpa!mcnc!rti!xyzzy!meissner
From: meissner@dg-rtp.dg.com (Michael Meissner)
Newsgroups: comp.std.c
Subject: Re: sizeof in 36-bits machines
Message-ID: <MEISSNER.89Oct14125043@tiktok.rtp.dg.com>
Date: 14 Oct 89 16:50:43 GMT
References: <272@ssp1.idca.tds.philips.nl>
Sender: usenet@xyzzy.UUCP
Organization: Data General (Languages @ Research Triangle Park, NC.)
Lines: 19
In-reply-to: dolf@idca.tds.PHILIPS.nl's message of 12 Oct 89 15:17:48 GMT