comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: pragma Import with 'Address clause
Date: Wed, 19 Mar 2003 15:03:57 -0600
Date: 2003-03-19T15:03:57-06:00	[thread overview]
Message-ID: <v7hmsnoaijprc9@corp.supernews.com> (raw)
In-Reply-To: mailman.1.1048093197.743.comp.lang.ada@ada.eu.org

Beard, Frank Randolph CIV wrote in message ...
>> The Pragma Import should not be needed.

>Shouldn't be needed but isn't guaranteed.  The Pragma Import is
>there to ensure the compiler doesn't initialize the data.  There
>is no guarantee that the compiler won't initialize it to
>something, despite the fact the data structure doesn't have a
>default expression.


Absolutely right. Also recall that Ada requires implicit initialization
of discriminants and access objects, so you need to insure that there is
nothing that requires implicit initialization as well as default
expressions.

>When we were on VAX Ada, it seemed to initialize everything within
>the range of the type.

I'm told that Rational Apex does this (I haven't checked it myself).

Conclusion: if you need your code to be portable enough to compile with
another Ada compiler (including a new version of the one you are using),
you'll use the pragma Import.

            Randy.





  reply	other threads:[~2003-03-19 21:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-19 16:59 pragma Import with 'Address clause Beard, Frank Randolph CIV
2003-03-19 21:03 ` Randy Brukardt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-19 14:12 Lutz Donnerhacke
2003-03-19 15:17 ` B0966864
2003-03-19 16:51 ` Stephen Leake
2003-03-19 17:10   ` Lutz Donnerhacke
2003-03-19 22:29     ` Rod Chapman
2003-03-21 11:13       ` Lutz Donnerhacke
2003-03-19 18:07 ` Rod Chapman
2003-03-21 11:31   ` Lutz Donnerhacke
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox