comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.leake@gsfc.nasa.gov>
Subject: Re: Urgent question: malloc and ada...READ/NEW/FOLLOWUP
Date: 1998/04/27
Date: 1998-04-27T00:00:00+00:00	[thread overview]
Message-ID: <3544C257.29F3@gsfc.nasa.gov> (raw)
In-Reply-To: 1998Apr26.172910.1@eisner


Larry Kilgallen wrote:
> 
> In article <x7vson01poa.fsf@pogner.demon.co.uk>, Simon Wright <simon@pogner.demon.co.uk> writes:
> > Jonathan Guthrie <jguthrie@brokersys.com> writes:
> >
> >> How does the Ada compiler implemetor know what C compiler is used in
> >> that "particular environment in which the compiler operates"?
> >> Telepathy?
> >
> > Well, one solution would be for the Ada vendor to specify it! In fact,
> > given the need to match the C representations, I think the Ada vendor
> > would have to.
> 
> And, depending on the compiler one might have to specify particular
> compilation modes for which the alignment characteristics will be
> matched.  I don't remember the details, but DEC C for Alpha allows
> one to generate code which naturally aligns elements on quadword
> boundaries or longword boundaries, depending on application needs.

Borland C on Windows/Intel has a similar option, and it bit me once. I
compiled my code with longword alignment (for floating point speed), but
the Borland libraries were compiled with byte alignment. Bingo; system
crash. So you don't even need inter-language complications to get bugs
like this!

It would be nice if the object files included this kind of information,
so it could be checked at link time; anyone know if any object formats
do?

On the original topic, the Ada vendor must specify which C compiler(s)
they support on the target of interest. This was true for Ada 83, and is
still true for Ada 95. On the other hand, most CPUs I've used have a
standard calling convention, so there isn't that much variation between
compilers. Intel seems to be an exception; are there really other CPUs
that have incompatible C compilers?

-- Stephe




  reply	other threads:[~1998-04-27  0:00 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-07  0:00 Urgent question: malloc and ada Guido Tesch
1998-04-09  0:00 ` Joe Gwinn
1998-04-10  0:00   ` Urgent question: malloc and ada...READ/NEW/FOLLOWUP Larry Kilgallen
1998-04-12  0:00     ` Joe Gwinn
1998-04-14  0:00       ` Robert Dewar
1998-04-16  0:00         ` Joe Gwinn
1998-04-17  0:00           ` Robert Dewar
1998-04-18  0:00             ` Joe Gwinn
1998-04-18  0:00               ` Robert Dewar
1998-04-25  0:00                 ` Joe Gwinn
1998-04-26  0:00                   ` Robert Dewar
1998-04-26  0:00                     ` Jonathan Guthrie
1998-04-26  0:00                       ` Simon Wright
1998-04-26  0:00                         ` Larry Kilgallen
1998-04-27  0:00                           ` Stephen Leake [this message]
1998-04-26  0:00                       ` Robert Dewar
1998-04-30  0:00                       ` Robert I. Eachus
1998-04-30  0:00                         ` Urgent question: malloc and ada Larry Kilgallen
1998-05-01  0:00                           ` Robert Dewar
1998-05-01  0:00                             ` Charles Hixson
1998-05-02  0:00                               ` Jonathan Guthrie
1998-05-02  0:00                             ` Corey Minyard
1998-05-06  0:00                             ` Robert I. Eachus
1998-05-12  0:00                               ` Craig T. Spannring
1998-05-12  0:00                                 ` Robert Dewar
     [not found]                           ` <matthew_heaney-ya023680003004981723000001@news.ni.net>
1998-05-01  0:00                             ` Robert Dewar
1998-05-01  0:00                               ` Larry Kilgallen
1998-05-02  0:00                                 ` Robert Dewar
1998-05-02  0:00                                   ` Jonathan Guthrie
1998-05-03  0:00                                     ` Richard Kenner
1998-05-03  0:00                                       ` Jonathan Guthrie
1998-05-03  0:00                                         ` Richard Kenner
1998-05-03  0:00                                         ` Robert Dewar
1998-05-03  0:00                                     ` Robert Dewar
1998-05-03  0:00                                   ` Larry Kilgallen
1998-05-01  0:00                       ` Urgent question: malloc and ada...READ/NEW/FOLLOWUP Fergus Henderson
1998-05-01  0:00                     ` Joe Gwinn
1998-05-02  0:00                       ` Larry Kilgallen
1998-05-05  0:00                       ` Robert Dewar
1998-04-10  0:00   ` Urgent question: malloc and ada Robert Dewar
1998-04-12  0:00     ` Joe Gwinn
1998-04-12  0:00       ` Enumeration Types (was: Urgent question: malloc and ada) Matthew Heaney
1998-04-13  0:00         ` Mark A Biggar
replies disabled

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