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-31 03:59:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!feed2.news.rcn.net!rcn!chnws02.mediaone.net!chnws06.ne.mediaone.net!24.128.8.70!typhoon.ne.mediaone.net.POSTED!not-for-mail From: "Jeff Creem" Newsgroups: comp.lang.ada References: <9ff447f2.0110100005.2503bb00@posting.google.com> <3BC40DF2.9447F025@icn.siemens.de> <3bc41989.4285341@news.demon.co.uk> <5ee5b646.0110301750.38ba5bfd@posting.google.com> Subject: Re: Size and pack X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: Date: Wed, 31 Oct 2001 11:58:11 GMT NNTP-Posting-Host: 24.61.92.65 X-Complaints-To: abuse@mediaone.net X-Trace: typhoon.ne.mediaone.net 1004529491 24.61.92.65 (Wed, 31 Oct 2001 06:58:11 EST) NNTP-Posting-Date: Wed, 31 Oct 2001 06:58:11 EST Organization: Road Runner Xref: archiver1.google.com comp.lang.ada:15473 Date: 2001-10-31T11:58:11+00:00 List-Id: OK.. I know I am going to regret this since whenever I question Robert I usually am wrong however without using the complete context of this thread, I believe Roberts statement is actually a little too broad. There ARE indeed times when you want a pragma pack and a rep spec. Not for the record case but for arrays of items that have been rep spec'ed. for example, the code fragment type My_Type is range 0 .. 3; for My_Type'size use 2; type My_Array is array (1 .. 4) of My_Type; pragma Pack (My_Array); -- Without this the following could fail for My_Array'size use 8; The pragma pack is needed I believe because the rep spec on My_Array can be rejected without it (At least it has been rejected by some compilers and I forget the exact rule but it had something to do with the final rep spec not being allowed to change the layout of the items within the array). Having said that VADS used to compile this without the pragma pack. Green Hills did not. I *THINK* GNAT does allow it to go through without the rep spec for several versions now. "Robert Dewar" wrote in message news:5ee5b646.0110301750.38ba5bfd@posting.google.com... > john.mccabe@emrad.com.nospam (John McCabe) wrote in message news:<3bc41989.4285341@news.demon.co.uk>... > > Your best bet would be to use as many representation attributes as are > > necessary. In general I would use both a representation clause and > > pragma pack > > No, that's pointless, if you use a complete rep clause, then it is > redundant to use pragma Pack since it won't have > any effect.