comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Compiling gnat into gcc-2.8.0
Date: 1998/02/26
Date: 1998-02-26T00:00:00+00:00	[thread overview]
Message-ID: <dewar.888520406@merv> (raw)
In-Reply-To: 34F5A906.1704@gsfc.nasa.gov


Stephe says

<<Another difference between gcc C and GNAT is that gcc C was deliberately
designed to compile with lots of different C compilers, while GNAT can
only be compiled with GNAT (not ObjectAda or any other Ada compiler).
This is because the internal compiler code relies on GNAT-specific
attributes (and there are probably other reasons). I doubt this will
change in the future (don't fix what aint broke), but as other Ada
compilers gain a wider distribution, it might be nice.
>>

It would be *quite* a difficult project to make GNAT compilable with other
than GNAT, and does not seem particularly useful. Even if you had a machine
where some other Ada 95 compiler was available, and not GNAT (I know of
no such cases currently), then you would probably find it much easier to
do a cross-build than struggle with the incompatibilities. For example,
the use of Unrestricted_Access is definitely important at some points,
as is the exact conventions for external names.

Remember that GNAT is much more than just an Ada program, it is an Ada
and C program with intimate connections between the Ada and C, and the
code definitely makes use of the fact that it knows that the Ada and
C compilers are compatible.

If one could not rely on this, then you would have to use Interfaces.C
junk between the various pieces of the compiler, which would obfuscate
large chunks of the code, and slow things down.

There are *many* other reasons why this would be hard to do.





  reply	other threads:[~1998-02-26  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-25  0:00 Compiling gnat into gcc-2.8.0 Kevin Taylor
1998-02-26  0:00 ` Stephen Leake
1998-02-26  0:00   ` Robert Dewar [this message]
1998-02-27  0:00   ` Markus Kuhn
1998-02-27  0:00     ` Robert Dewar
1998-02-27  0:00       ` Andi Kleen
1998-02-27  0:00         ` Larry Kilgallen
1998-02-27  0:00           ` Robert Dewar
1998-02-27  0:00     ` Richard Kenner
1998-03-01  0:00       ` Trusting GNAT for security software Markus Kuhn
1998-03-01  0:00         ` Robert Dewar
1998-03-01  0:00           ` Larry Kilgallen
1998-03-01  0:00             ` Robert Dewar
1998-03-02  0:00               ` Larry Kilgallen
1998-03-02  0:00             ` Andi Kleen
1998-03-02  0:00               ` Larry Kilgallen
1998-02-26  0:00 ` Compiling gnat into gcc-2.8.0 Simon Wright
1998-02-26  0:00   ` Robert Dewar
replies disabled

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