comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: Re: Access and alias
Date: 2000/04/09
Date: 2000-04-09T00:00:00+00:00	[thread overview]
Message-ID: <or5I4.4973$Qy3.379919@news.pacbell.net> (raw)
In-Reply-To: 8cp1m8$3v5$1@nnrp1.deja.com

> > language and the Ada compiler?
>
> Where do you get that from? There is no requirement in the RM
> for such a check, and indeed it would be very annoying, since
> obviously for example C is quite capable of handling any
> possible Ada parameter at the other end if parameters are
> passed in a manner consistent with the ABI.

The question in the post continued:

>> language and the Ada compiler?  For
>>
>>   type Matrix is array(1 .. 10, 1 .. 5) of float;
>>   type pconstrained is access matrix;
>>   type List is array(integer range <>) of float;
>>   type punconstrained is access List;
>>
>>   function cf(a : pconstrained; b : punconstrained) return float;
>>   pragma import(C, cf);
>>
>> Gnat 3.12p NT does indeed generate a nice diagnostic
>> "type of cf.b does not correspond to C pointer".
>>
>> But it gives no warning for
>>
>>   function Trace(M : in Matrix) return float;
>>   pragma import(Fortran, Trace);
>>
>> where of course Matrix is stored in one way in Ada and another
>> in Fortran.  Is this disparity just B.1(20)'s "The implementation
>> permits T as an L-compatible type" with Gnat permitting
>> Matrix but not punconstrained?

> for example C is quite capable of handling any possible Ada parameter

In that case, what, if anything, does RM B.1 (26) "For an imported or
exported subprogram, the result and parameter types shall each be
compatible with the convention specified in the corresponding program."
require of the compiler?




  reply	other threads:[~2000-04-09  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-04  0:00 Access and alias NANCY HEHIR
2000-04-04  0:00 ` Laurent Guerby
2000-04-04  0:00   ` NANCY HEHIR
2000-04-04  0:00     ` Laurent Guerby
2000-04-05  0:00       ` Alfred Hilscher
2000-04-05  0:00         ` Ted Dennison
2000-04-05  0:00           ` Jeff Carter
2000-04-06  0:00             ` Robert Dewar
2000-04-07  0:00               ` Jeff Carter
2000-04-06  0:00             ` Alfred Hilscher
2000-04-07  0:00               ` Jeff Carter
2000-04-06  0:00           ` Robert Dewar
2000-04-06  0:00           ` tmoran
2000-04-07  0:00             ` Robert Dewar
2000-04-07  0:00               ` tmoran
2000-04-09  0:00                 ` Robert Dewar
2000-04-09  0:00                   ` tmoran [this message]
2000-04-10  0:00                 ` Jack W. Sharer
2000-04-05  0:00         ` Laurent Guerby
2000-04-05  0:00     ` Jeffrey D. Cherry
2000-04-04  0:00 ` tmoran
replies disabled

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