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: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Ada 95 Numerics questions for the experts Date: 1997/08/28 Message-ID: #1/1 X-Deja-AN: 268810817 References: <3401C14B.480@gsfc.nasa.gov> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-08-28T00:00:00+00:00 List-Id: Jeff said <> Indeed, the confirming size clause is definitely appropriate. In fact consider the example that inspired the thread: type x is range 0 .. 7; for x'size use 3; type r is array (1 .. 8) of x; pragma Pack (r); for r'size use 24; The size clause says here, I *really* want tight packing, the RM allowed expansion to 4 bits is not acceptable. Now your code will be accpted by GNAT that is doing what you want, but rejected by a compiler taking advantage of the RM's permissiveness here. Of course this rejection may mean you have a problem on your hands, but at least you know right away at compile time.