comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Are 'pragma Export' and access types mutually exclusive?
Date: 1997/08/09
Date: 1997-08-09T00:00:00+00:00	[thread overview]
Message-ID: <dewar.871142199@merv> (raw)
In-Reply-To: 33EBA058.5680@mathworks.com


Tom asks a question about export. here is a simplifid version of his
program:

procedure z is

  type x is access procedure;

  procedure l;
  pragma Export (C, L);

  procedure l is begin null; end;
  xx : x;

begin
  xx := l'access;
end;


This program is most certainly illegal, since conventions must match for
the use of access (that's obvious if you think about it, you cannot have
an access values that sometimes points to convention C things, and sometimes
to convention Ada things (how would you call such a beast if the calling
conventions were different?)

The program is easily fixed by making sure the conventions match.






      parent reply	other threads:[~1997-08-09  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-08  0:00 Are 'pragma Export' and access types mutually exclusive? Tom Weis
1997-08-08  0:00 ` Robert A Duff
1997-08-09  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