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: 270863951 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: >Sorry, I should have clarified that my advice was stylistic. It doesn't >matter what the RM says -- stylistically, Pack means "minimize space, >more or less", and "for T'Component_Size use N" means, "I want exactly >N-bit components". Surely Pack had that feeling in Ada 83, and the >addition of requirements in Ada 95 was merely a response to >implementations that failed to do *anything* to minimize space, so we >had to specify *how much* (as a minimum) space has to be minimized. Assume conformance to Annex C, and I compile this declaration: type T is range 0 .. 7; type A is array (Integer range 1 .. 10) of T; for A'Component_Size use 3; Yes or no: if the implementation doesn't support a component size of 3, can it still compile this declaration, giving A some other component size? >From what Robert Dewar said, it seems that, if we interpret the RM literally, one must also include a pragma Pack, in order to get the compiler to reject the declaration (if it doesn't support a component size of 3). I ask because there might be a bug in the RM, and that the intentation of the RM is that the compiler reject the declaration above, in spite of the fact that there is no pragma Pack, if it doesn't support that component size. So, Bob Duff, writer of the RM, answer yes or no: is pragma Pack required in the example above, in order to guarantee that the component size really is 3? -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271