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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ffdd4d59cbfb4caf X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Ada 95 Numerics questions for the experts Date: 1997/09/08 Message-ID: #1/1 X-Deja-AN: 270889534 References: Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-09-08T00:00:00+00:00 List-Id: In article , bobduff@world.std.com (Robert A Duff) wrote: >>I assumed that by specifying >>the component size to be 3, that that meant the component size should be 3. >>How naive of me! > >Well, it should, I'm confused by this answer. What does you mean when you say that the component size "should" be 3? Is it 3, or isn't it? Assuming conformance to Annex C, can a compiler legally compile the declaration (that doesn't have a pragma Pack), and _not_ give the array a component size of 3? >but what should 'Component_Size be for an array of >3-bit components, where the implementation puts 10 of them in each word, >and leaves a gap of 2-bits at the end of each word? (I'm assuming >32-bit words, here.) > >If there's a "gap" of 1 bit between each 3-bit component, then I don't >think that should be called a "gap" at all -- we should call that >situation "4-bit components". Again, I am confused by your answer. What does it mean to say that "I don't think" it should be called a gap, or we "should" call the situtation 4-bit components? Doesn't the RM define the meaning of the term "gap"? What was the intent of the RM, if it doesn't define gap? Yes or no: According to the RM, is dense, no-gaps-between-the-components packing _implied_ by the specification of a Component_Size clause? Or is pragma Pack always required as part a declaration? Robert says that both a pragma Pack and a component size clause are required to be given in order to guarantee that component size. Is this the intent of the RM? Or is he reading the RM too literally? (I should rephrase that last question: Is there an error in the RM, such that its statements about also requiring a pragma Pack, are ambiguous?) -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271