Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: sizeof in 36-bits machines Message-ID: <11284@smoke.BRL.MIL> Date: 14 Oct 89 04:28:44 GMT References: <272@ssp1.idca.tds.philips.nl> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 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 ? C requires that all data types have sizes that are integral multiples of the size of a "char" (aka "byte"). This means that a 36-bit implementation would have to make "char" 9, 12, 18, or 36 bits. (The minimum allowed size is 8 bits, but 8 does not divide 36 evenly.) I don't say that I LIKE this; I would have preferred permitting such implementations to express sizeof in terms of bits, not bytes. However, that's what was officially decided.