comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: C array to ada record interface
Date: Thu, 29 Jul 2004 15:58:00 -0400
Date: 2004-07-29T15:58:00-04:00	[thread overview]
Message-ID: <IbidnQ5I3I1Vy5TcRVn-vg@comcast.com> (raw)
In-Reply-To: <fk0Oc.189247$JR4.48976@attbi_s54>

tmoran@acm.org wrote:

>   Presumably a 64 bit Ada compiler could be designed to work with a 32 bit
> C compiler, with pragma Convention(C, an_access_type) causing
> an_access_type to be a 32 bit pointer (with implied additional 32 bits
> from a segment or base or just zero, for instance) rather than a 64 bit
> pointer.  Such a compiler ought to be able to do System.Address <-> access
> type conversions for 32 bit, as well as 64 bit, access types, but Ada's
> System.Address_To_Access_Conversions could only work for one of those,
> right?  Perhaps the vendor of such a compiler would offer (non-standard)
> package System.Address_To_Access_Conversions.C
> for doing the (32 bit or convention C) conversions.

Doesn't even have to be a non-standard mode.  In theory you could 
validate a compiler in two modes that support different C compilers or 
different operating modes.  Of course, a compiler that wants to support 
two different C calling conventions usually has two additional 
convention names, and probably a compiler switch that tells which one 
corresponds to convention C.

The point I was trying to make was that which C compiler is chosen to 
bind to, and how it is chosen is outside the scope of the standard.  So, 
in general, the code as written will work.  But there is no 
implementation-independent way to guarantee it.

-- 

                                           Robert I. Eachus

"The flames kindled on the Fourth of July, 1776, have spread over too 
much of the globe to be extinguished by the feeble engines of despotism; 
on the contrary, they will consume these engines and all who work them." 
-- Thomas Jefferson, 1821




      reply	other threads:[~2004-07-29 19:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-14 23:17 C array to ada record interface Francisco Javier Loma Daza
2004-07-15  0:36 ` Brian May
2004-07-15  1:23 ` Jeffrey Carter
2004-07-22 18:02   ` Francisco Javier Loma Daza
2004-07-24 18:48     ` Ludovic Brenta
2004-07-25 17:26       ` Francisco Javier Loma Daza
2004-07-25 19:28       ` tmoran
2004-07-26 21:42         ` Ludovic Brenta
2004-07-27 21:04           ` tmoran
2004-07-27 22:15             ` Martin Dowie
2004-07-28  2:42             ` Robert I. Eachus
2004-07-29  5:56               ` tmoran
2004-07-29 19:58                 ` Robert I. Eachus [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