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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.16.132 with SMTP id g4mr10733151obd.0.1441697231271; Tue, 08 Sep 2015 00:27:11 -0700 (PDT) X-Received: by 10.182.120.10 with SMTP id ky10mr91158obb.37.1441697231249; Tue, 08 Sep 2015 00:27:11 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!kq10no1657581igb.0!news-out.google.com!f6ni4446igi.0!nntp.google.com!kq10no2208159igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 8 Sep 2015 00:27:10 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=194.138.39.55; posting-account=IcHmbgoAAABVfpbjrkJyy4Yb3hmce3tn NNTP-Posting-Host: 194.138.39.55 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Addressing in Object Ada v/s GNAT (2013) showing Vast Differences From: Lucas Redding Injection-Date: Tue, 08 Sep 2015 07:27:11 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:27739 Date: 2015-09-08T00:27:10-07:00 List-Id: On Monday, September 7, 2015 at 4:49:01 PM UTC+1, Jeffrey R. Carter wrote: > On 09/07/2015 04:39 AM, Lucas Redding wrote: > >=20 > > I have a program that runs perfectly in Object Ada. The program relies > > heavily on "USE AT" clauses together with 'SIZE on underlying type > > definition. This is in order to map directly and deterministically to m= emory > > with bit precision. The data is independently produced so this is very > > important. >=20 > "Use at" is the Ada-83 mechanism for specifying an object's address; sinc= e Ada > 95 the form >=20 > for V'Address use A; >=20 > is preferred, and "use at" is considered obsolete. I would guess, then, t= hat > this program has been around for quite a while, having originally been Ad= a 83, > and that there has been on-going effort to port it to new hardware, OS ve= rsions, > and compilers to keep it available. >=20 > Addresses are something that are platform and compiler dependent. It prob= ably > took a fair amount of effort to understand how Object Ada lays things out= in > memory to get to the version you currently have. A similar amount of effo= rt > should be expected to understand GNAT's approach to these things and to m= odify > the representation clauses to achieve the same representation as OA. You'= ve > already found that GNAT wants to align things differently from OA, so spe= cifying > non-default alignments may be necessary. >=20 > --=20 > Jeff Carter > "Why, the Mayflower was full of Fireflies, and a few > horseflies, too. The Fireflies were on the upper deck, > and the horseflies were on the Fireflies." > Duck Soup > 95 Thanks Jeff.=20 Good guess. Yes it has been around quite long. You confirmed my worst fears, re Addressing is compiler dependent. I knew I= had read that somewhere but I did not expect there to be such a big differ= ence if you had made full use of the language facilities which on their own= seem to specify a great deal of precision in mapping to memory.=20 I need to draw a balance between the effort of porting the application and = the gain in productivity after porting it. After all, it works on OA with n= o extra effort (only without the richness of the features offered by GNAT) = The more effort it takes to port it the weaker the attraction. I have tried the -gnatR that GB kindly suggested. I am now studying the inf= ormation to measure the amount of effort required to port. I am still hopin= g my expectations are somehow correct (re make full use of the language fac= ilities for mapping on to memory makes the mapping precise). I shall report back when I have made a decsion. Thanks agaion LR