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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ee9f582dbd8ab972,start X-Google-Attributes: gid103376,public From: dch@st-vincent (David Haslam) Subject: 'size works for SunAda but not GNAT Date: 1996/10/08 Message-ID: <53dv03$3ti@gcsin3.geccs.gecm.com>#1/1 X-Deja-AN: 188043342 organization: "GEC-Marconi S3I, Simulation and Training Division" reply-to: David.Haslam@gecm.com newsgroups: comp.lang.ada Date: 1996-10-08T00:00:00+00:00 List-Id: I have a lot of code like this, which compiles fine with SunAda 1.1: subtype V is integer range 0..63; type A is array (1..9) of V; for A'size use 9 * 8; GNAT complains "size for A must be at least 288". GNAT wants V to be 32 bits, even though it can fit in 8. If GNAT is correct in rejecting this, then it implies that the code we have is non-portable (and relied on a Verdix implementation dependent feature). If so, how do I write portable rep clauses? There are two ways of fixing the code for GNAT: 1. use a type instead of a subtype 2. add the line: "for A'component_size use 8;" Which of these is better? -- David Haslam Work: David.Haslam@gecm.com GEC-Marconi S3I Ltd Home: dch@sirius.demon.co.uk Simulation and Training Division