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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8247c32bb1260c74 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-20 21:44:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc02.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Q re pack & aliased References: <20030420134018.651050df.david@realityrift.com> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc02 1050900273 12.234.13.56 (Mon, 21 Apr 2003 04:44:33 GMT) NNTP-Posting-Date: Mon, 21 Apr 2003 04:44:33 GMT Organization: AT&T Broadband Date: Mon, 21 Apr 2003 04:44:33 GMT Xref: archiver1.google.com comp.lang.ada:36327 Date: 2003-04-21T04:44:33+00:00 List-Id: > > I need to make a packed array of aliased three byte objects. Gnat 3.15p > > tells me it won't pack (or set 'component_size) for aliased objects, and > > it allocates four bytes/component. How can I get around this limitation? > > I'm no Ada expert just yet. But what about 'Unchecked_Access or 'Unrestricted_Access? > If you are doing something evil maybe 'Address would work too... I'm just trying to write portable Ada. The problem isn't in the access, it's in the declaration - Gnat won't accept it. "packing" 24 bits objects shouldn't be all that hard on a byte oriented (x86 Windows) machine.