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,38ceb882eed41e1e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-29 02:30:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!cyclone1.gnilink.net!washdc3-snf1!washdc3-snh1.gtei.net!chcgil2-snh1.gtei.net!chcgil2-snf1.gtei.net!news.gtei.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Size and pack Date: 29 Oct 2001 04:29:42 -0600 Organization: LJK Software Message-ID: References: <_umC7.74983$gT6.38373531@news1.rdc1.sfba.home.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1004351405 2695 192.135.80.34 (29 Oct 2001 10:30:05 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Mon, 29 Oct 2001 10:30:05 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:15334 Date: 2001-10-29T04:29:42-06:00 List-Id: In article , lutz@iks-jena.de (Lutz Donnerhacke) writes: > * tmoran@acm.org wrote: >>> > Log_Num at 5 range 0 .. 31; >>> > End_Byte at 9 range 0 .. 7; >>> > LRC at 10 range 0 .. 7; >>> > end record; >>> > for Rx_Header_Data'size use 8*11; >>> >>> The problem was that this rep clause will not work, because Log_Num must >>> be aligned to a 4-byte boundary. Some compilers will silently ignore your >>> rep clause, I believe GNAT will tell you it can't do it. >> >> I tested it on Gnat 3.13p on Windows before posting, and Gnat was >>perfectly happy with it. And ARM 13.5.1(23) says that "If component >>clauses are given for all components, the record representation clause >>completely specifies the representation of the type and will be obeyed >>exactly by the implementation." That seems pretty unambiguous to me. > > Compile on Alpha and get BUS ERROR. Presumably that is a runtime rather than compilation time error. You didn't say what model of Alpha, but older chips require certain instructions be aligned. VMS deals with this through alignment fault handlers that fix up such problems at a penalty of about 100 instructions. Perhaps you are on Unix or Linux (you didn't say in the body text). If so, look at your compiler instructions for something regarding which Alpha chip you are targeting. Specify an older chip and the resulting code should work on all.