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-Thread: 103376,379f9c2a66a5ddc8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Question about package Interfaces. Date: Tue, 14 Sep 2010 19:01:33 +0200 Organization: Adalog Message-ID: References: <4c8d7a8e$0$2408$4d3efbfe@news.sover.net> <4c8e2be0$0$2414$4d3efbfe@news.sover.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 14 Sep 2010 17:01:34 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="z/xN1DBP8RUb+r9ug/i0hg"; logging-data="10192"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yV3LiOY4VYZUm+uyHc83A" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 In-Reply-To: Cancel-Lock: sha1:0JXVfx0GG6sAw0us11MqncAC5W4= Xref: g2news1.google.com comp.lang.ada:14076 X-Original-Bytes: 2056 Date: 2010-09-14T19:01:33+02:00 List-Id: Le 14/09/2010 18:36, Jeffrey Carter a �crit : > On 09/13/2010 11:33 PM, J-P. Rosen wrote: >> >> Imagine that you declared: >> X : Unsigned_8; >> and you discover that the declaration advances the data counter by 4 >> bytes. You can interpret that as X occupying 32 bits, or as X occupying >> only 8 bits with 3 unused padding bytes ahead of it. >> >> There is positively no way to tell the difference. > > You could examine the machine code to see if it does 4-byte or 1-byte > load and stores. > Not exactly. A compiler is allowed to overwrite unused bytes if it makes code more efficient -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr