comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Ada array vs C pointer (call by reference)
Date: Sat, 28 Jun 2008 13:52:19 -0400
Date: 2008-06-28T13:52:19-04:00	[thread overview]
Message-ID: <wccvdztphv0.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 44b654da-5a19-4230-a5f2-94e35f2b3aeb@d19g2000prm.googlegroups.com

Adam Beneschan <adam@irvine.com> writes:

> On Jun 27, 3:14 pm, Keith Thompson <ks...@mib.org> wrote:
>> It doesn't *mandate* the representation used by the C compiler; the
>> author of the Interfaces.C implementation has to *know* the
>> representation used by the C compiler.
>
> Which is, of course, impossible without a crystal ball.

No need for crystal balls.  Just read the documentation of the C
compiler.

Maybe you're worried that the C compiler will change the size of float
in a future version?  Well, first of all, that won't happen because it
will break existing C programs.  But if it does, then that's a new and
different implementation of C, and the Ada compiler would have to be
modified in order to support interfacing to it.  Why is that a problem?

This whole argument started because somebody wanted to use Float instead
of C_Float.  But there is nothing in the Ada RM saying that Float should
correspond to anything in particular.  There IS something in the RM
saying that C_Float corresponds to float as implemented by the C
compiler(s) that the Ada compiler claims to support interfacing to.
And the Ada compiler documentation will tell you which C compiler(s)
are supported.

- Bob



  parent reply	other threads:[~2008-06-28 17:52 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 [this message]
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
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