comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst-u@mib.org>
Subject: Re: Ada array vs C pointer (call by reference)
Date: 28 Jun 2008 14:46:08 -0700
Date: 2008-06-28T14:46:08-07:00	[thread overview]
Message-ID: <lz4p7d6xnj.fsf@stalkings.ghoti.net> (raw)
In-Reply-To: 72661814-9e6e-40bb-a013-ad3b5c7217dc@59g2000hsb.googlegroups.com

Maciej Sobczak <see.my.homepage@gmail.com> writes:
> On 28 Cze, 02:56, "Peter C. Chapin" <pcha...@sover.net> wrote:
> > My understanding is that the interfacing to C is only really meaningful
> > if the Ada compiler is in some way associated with a corresponding C
> > compiler (for example, created by the same vendor).
> 
> This is exactly my point.

And it's exactly wrong, or at least overstated.

The only required association is that the provider of the Ada compiler
*knows* the characteristics of the relevant C compiler.  That's not
hard to find out.  I'm not associated with the authors of gcc, but I
can find out its characteristics on a given system in just a few
minutes.  For that matter, I can probably write a program that
produces as output the correct declarations for Interfaces.C.

And since code generated by different C compilers on the same system
has to interoperate, it's generally in the interest of the C compiler
vendors to use the same representations for types on a given system.

Providing both the C and Ada compilers certainly makes it easier to
get Interfaces.C right, but even if the compilers aren't associated,
it's reasonably easy and reasonably reliable (certainly more so than
just assuming that Float and C_Float are compatible).

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"



  parent reply	other threads:[~2008-06-28 21:46 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27  1:39 Ada array vs C pointer (call by reference) Adrian Hoe
2008-06-27  1:42 ` Adrian Hoe
2008-06-27  2:55 ` Adam Beneschan
2008-06-27 13:02   ` Maciej Sobczak
2008-06-27 13:15     ` Adrian Hoe
2008-06-27 14:43     ` Georg Bauhaus
2008-06-27 14:47       ` Georg Bauhaus
2008-06-27 20:35       ` Maciej Sobczak
2008-06-27 22:00         ` Georg Bauhaus
2008-06-27 22:46           ` Keith Thompson
2008-06-27 16:11     ` Keith Thompson
2008-06-27 17:00       ` Robert A Duff
2008-06-27 18:15         ` Keith Thompson
2008-06-28 14:02         ` Stephen Leake
2008-06-28 21:18           ` Keith Thompson
2008-07-03 12:44         ` Rob Norris
2008-06-27 20:44       ` Maciej Sobczak
2008-06-27 22:14         ` Keith Thompson
2008-06-27 22:36           ` Adam Beneschan
2008-06-28 14:04             ` Stephen Leake
2008-06-28 21:22               ` Keith Thompson
2008-06-30 17:13               ` Adam Beneschan
2008-06-28 17:52             ` Robert A Duff
2008-06-30 17:13               ` Adam Beneschan
2008-06-30 18:55                 ` Robert A Duff
2008-07-01 21:19                 ` Randy Brukardt
2008-07-01 21:19                 ` Randy Brukardt
2008-06-28  0:56         ` Peter C. Chapin
2008-06-28 14:11           ` Maciej Sobczak
2008-06-28 17:49             ` tmoran
2008-06-28 21:46             ` Keith Thompson [this message]
2008-06-28 17:44         ` Robert A Duff
2008-07-01 21:10       ` Randy Brukardt
2008-06-27 18:13     ` tmoran
2008-06-27 20:49       ` Maciej Sobczak
2008-06-27  4:10 ` Jeffrey R. Carter
2008-06-27  8:22   ` Adrian Hoe
2008-06-27 15:07     ` Adam Beneschan
2008-06-27 22:54     ` Jeffrey R. Carter
2008-06-28  1:15       ` Adrian Hoe
2008-06-28  2:17         ` Adam Beneschan
2008-07-01 21:31           ` Randy Brukardt
2008-07-01 21:31           ` Randy Brukardt
2008-08-22  4:06           ` Adrian Hoe
2008-06-28  4:59         ` Jeffrey R. Carter
2008-06-29  3:48         ` anon
2008-06-28  1:21 ` anon
replies disabled

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