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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,49b52b8065390e5a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!p20g2000yqi.googlegroups.com!not-for-mail From: "patrick.gunia@googlemail.com" Newsgroups: comp.lang.ada Subject: Re: Ada Plattform Independence Date: Wed, 11 Mar 2009 10:00:18 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <82d07df7-bee1-4fd4-b0e1-dd10f43f9f60@q1g2000vbn.googlegroups.com> NNTP-Posting-Host: 78.34.72.173 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1236790818 13952 127.0.0.1 (11 Mar 2009 17:00:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 11 Mar 2009 17:00:18 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p20g2000yqi.googlegroups.com; posting-host=78.34.72.173; posting-account=D7TrwwoAAAAVyN71CASRiSp392RIjlsB User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.64 (Windows NT 6.0; U; de) Presto/2.1.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:4040 Date: 2009-03-11T10:00:18-07:00 List-Id: On 11 Mrz., 16:37, Jean-Pierre Rosen wrote: > patrick.gu...@googlemail.com a =E9crit : > > > Hi all, > > > I=B4m currently working on an analysis of an Ada-System with focus on > > the current state of plattform-independence. As my experiences wirh > > porting Ada-software to different operating system is limited and > > close to zero, I=B4d like to ask, which conecpts of the langiage might > > cause problems. > > Ada allows writing portable programs, however it does not guarantee in > itself that programs will be portable. The language purposedly allowed > to depend on the peculiarities of the target. Care is still needed to > achieve portable code. Common difficulties include: > > -Relying on the characteristics of predefined types (Integer and Duration= ) > > -Differences on the implementation of Address. Some compilers (mainly > Ada83) defined Address as an integer type, while current common practice > is to make it private, which causes problems if people are doing > (uncontrolled) address arithmetic I also thought of this aspect. I have the big advantage that the software is only executed on a very limited range of hardware configurations. Using the same compiler implementation for different plattforms (for example GNAT) would solve this problem? > -Representation clauses. Compilers vary in their support of > representation clauses, sometimes for good reasons: some representation > clauses that are acceptable on some targets would lead to unreasonable > code on a different hardware. Representation clauses may also depend on > predefined types; f.e., if you have a record field of type Duration, you > may have problems when moving a program from an implementation where > Duration is 32 bits to one where Duration is 64 bits Same aspect as above, when I use GNAT on GNU/Linux and Windows to compile this code, it should use the same implementation of Duration? > -Outrageously wrong code written by people who write "C-in-Ada", with > lots of unchecked conversions between pointers and addresses. The code uses unchecked_conversions to call imported C-functions. I don =B4t think that I can avoid this problem. Though the software is always executed on 32-Bit systems, thus this should also work out, or am I getting something terribly wrong here? > In practice, most portability problems are rooted in insufficient > training of the people who wrote the code initially. > -- > --------------------------------------------------------- > =A0 =A0 =A0 =A0 =A0 =A0J-P. Rosen (ro...@adalog.fr) > Visit Adalog's web site athttp://www.adalog.fr Last but not least, thanks for your answer! Patrick