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-22 09:44:36 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: X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc02 1051029858 12.234.13.56 (Tue, 22 Apr 2003 16:44:18 GMT) NNTP-Posting-Date: Tue, 22 Apr 2003 16:44:18 GMT Organization: AT&T Broadband Date: Tue, 22 Apr 2003 16:44:18 GMT Xref: archiver1.google.com comp.lang.ada:36351 Date: 2003-04-22T16:44:18+00:00 List-Id: >The first True-Color-VGA had 24-bit-sized pixels. How would you have >addressed them? I have pre-Gnat 3.15p programs that ran with 24 bit pixels, so this is apparently a new problem. Would someone with a newer Gnat please try the program below? On 3.15p it gives a warning on aliased, and ignores the packing. Removing the word "aliased" makes it pack correctly. with ada.text_io; procedure testpack is type triples is range 0 .. 2**24-1; for triples'size use 24; type bunches is array(integer range <>) of aliased triples; pragma pack(bunches); x : bunches(1 .. 10); begin ada.text_io.put_line(integer'image(x'size/80) & " should = 3, not 4"); end testpack;