comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Rational Apex and RM 7.4(2)
Date: 1998/08/06
Date: 1998-08-06T00:00:00+00:00	[thread overview]
Message-ID: <dewar.902414127@merv> (raw)
In-Reply-To: 6qbomp$s9k$1@nnrp1.dejanews.com

Andrew says

<<Has anyone else come across this problem (if it is a problem), or are
we doing something "naughty"?

  package A is
    ...
    package B is
       type Foo is private;
       ...
    private
       type Foo is new System.Address;
    end B;

    Bar : constant B.Foo;
    ...
  private
    pragma Import (C, Bar, "C_Bar");
  end A;
>>


You are not doing anything naughty, but you are doing something that not
all compilers may support, since a compiler is given a lot of freedom in
what it implements using pragma Import.

GNAT certainly regards the support of this particular case of pragma
Import as an important one, but it is certainly true that compilers that
are less capable in this area may legitimately choose not to implement
this useful feature. You should complain to your vendor, and make it
clear that you would like them to implement it. It is hard to believe
that it is hard to do, so this is most likely an oversight that can 
easily be corrected.

Robert Dewar
Ada Core Technologies

Note that not even pragma Interface (C, ...) to anything at all is a required
part of the Ada 95 standard, so any time you use pragma Interface , you must
verify that you are using a form of it that is supported by the particular
compiler you intend to use.





      reply	other threads:[~1998-08-06  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-06  0:00 Rational Apex and RM 7.4(2) x1y2z3
1998-08-06  0:00 ` Robert Dewar [this message]
replies disabled

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