comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-dejanews.com>
Subject: Re: LRM on passing data *from* C
Date: 1999/05/22
Date: 1999-05-22T00:00:00+00:00	[thread overview]
Message-ID: <7i69lg$h8o$1@nnrp1.deja.com> (raw)
In-Reply-To: dale-2205991156210001@r1021c-20.ppp.cs.rmit.edu.au

In article <dale-2205991156210001@r1021c-20.ppp.cs.rmit.edu.au>,
  dale@cs.rmit.edu.au (Dale Stanbrough) wrote:
> Robert Dewar wrote:
>
> How could  this be? If "int" is implemented by compiler A as
> being 16 bits, and by compiler B as 32 bits, how can you have
> one simple interface?

This is an Ada83 style question :-)

In Ada 95, this problem is 100% solved. The Ada compiler MUST
be written to understand the conventions of the C compiler. If
there are multiple C compilers with different conventions (an
unusual situation, probably only found in the chaotic PC world)
then a vendor has two alternatives:

1. Support one of these compilers, and document which one

2. Support two or more with separate conventions, e.g.

    pragma Export (Borland_C, procname);

In fact, even in the PC World, things seem to have settled
down reasonably well, for example int is always 32 bits these
days on PC's, at least those PC systems in which Ada-95 is
likely to come into contact.


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---




      reply	other threads:[~1999-05-22  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-21  0:00 LRM on passing data *from* C dennison
1999-05-22  0:00 ` Dale Stanbrough
1999-05-22  0:00   ` Robert Dewar
1999-05-22  0:00 ` Robert Dewar
1999-05-22  0:00   ` Dale Stanbrough
1999-05-22  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