From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,167fc3ed1f7df035,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.233.69 with SMTP id tu5mr1853609pbc.6.1334248030413; Thu, 12 Apr 2012 09:27:10 -0700 (PDT) Path: r9ni48322pbh.0!nntp.google.com!news1.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: C's sizeof Date: Thu, 12 Apr 2012 17:27:09 +0100 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="20668"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/NkuSi1KkcBXDG38RgMgn950Ju4q8WRYo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:3Cf5vzhMB7N/eKEkhFBqjEdoxbY= sha1:Duwqy2tUdgRNxBMWqXPoN+ep1oE= Content-Type: text/plain; charset=us-ascii Date: 2012-04-12T17:27:09+01:00 List-Id: The (draft) ARM Annex B.3[1] says at para 73 - Note 7 - "To obtain the effect of C's sizeof(item_type), where Item_Type is the corresponding Ada type, evaluate the expression: size_t(Item_Type'Size/CHAR_BIT)." Should that not be size_t((Item_Type'Size + CHAR_BIT - 1)/CHAR_BIT) ? [1] http://www.ada-auth.org/standards/12rm/html/RM-B-3.html