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,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d842554064cfae31 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-11 23:13:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!teaser.fr!enst.fr!not-for-mail From: "Grein, Christoph" Newsgroups: comp.lang.ada Subject: Re: Non byte-aligned components in GNAT rejected Date: Thu, 12 Dec 2002 08:05:16 +0100 (MET) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1039677183 20281 137.194.161.2 (12 Dec 2002 07:13:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 12 Dec 2002 07:13:03 +0000 (UTC) Return-Path: X-Authentication-Warning: mail.eurocopter.com: uucp set sender to using -f Content-MD5: HS5PiihCeb0wO6jwZFD08g== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk X-Reply-To: "Grein, Christoph" List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:31723 Date: 2002-12-12T08:05:16+01:00 > ----------------------------------------------------------- > > package NBA is > > type VMF_Character is new Character range > Character'Val(0) .. Character'Val(127); > for VMF_Character'Size use 7; > > type Unit_Name_Type is array (1..64) of VMF_Character; > for Unit_Name_Type'Component_Size use 7; > for Unit_Name_Type'Size use 448; > > type Unit_Group_Type is record > B : Boolean; > Unit_Name : Unit_Name_Type; > end record; > for Unit_Group_Type use record > B at 0 range 0 .. 0; > Unit_Name at 0 range 1 .. 448; -- This is rejected > end record; > > end NBA; > _______________________________________________ The following works. You have to split the name so that it has the correct boundaries. package NBA is type VMF_Character is new Character range Character'Val(0) .. Character'Val(127); for VMF_Character'Size use 7; type Unit_Name_Type is array (1..56) of VMF_Character; for Unit_Name_Type'Component_Size use 7; for Unit_Name_Type'Size use 56*7; type Unit_Last_Type is array (1..7) of VMF_Character; for Unit_Last_Type'Component_Size use 7; for Unit_Last_Type'Size use 7*7; type Unit_Group_Type is record B : Boolean; Unit_First: VMF_Character; Unit_Name : Unit_Name_Type; Unit_Last : Unit_Last_Type; end record; for Unit_Group_Type use record B at 0 range 0 .. 0; Unit_First at 0 range 1 .. 7; -- together Unit_Name at 1 range 0 .. 56*7 - 1; -- 64 Unit_Last at 1 range 56*7 .. (56+7)*7; -- characters end record; end NBA;