* Make C++ via Ada95/Gnat ?
@ 2001-08-16 8:30 Reinert Korsnes
2001-08-16 9:22 ` Larry Kilgallen
2001-08-17 1:22 ` Robert Dewar
0 siblings, 2 replies; 6+ messages in thread
From: Reinert Korsnes @ 2001-08-16 8:30 UTC (permalink / raw)
Hi,
Is it possible/practical to produce C++ code by first making Ada95 code
and then from this produce C++ (via Gnat) ? Just a bad idea ?
(I would prefer to make/test Ada95 code rather than C++)
reinert
--
http://home.chello.no/~rkorsnes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Make C++ via Ada95/Gnat ?
2001-08-16 8:30 Make C++ via Ada95/Gnat ? Reinert Korsnes
@ 2001-08-16 9:22 ` Larry Kilgallen
2001-08-16 10:36 ` sk
2001-08-16 12:01 ` Marc A. Criley
2001-08-17 1:22 ` Robert Dewar
1 sibling, 2 replies; 6+ messages in thread
From: Larry Kilgallen @ 2001-08-16 9:22 UTC (permalink / raw)
In article <9lg0gs$9dv$1@snipp.uninett.no>, Reinert Korsnes <Reinert.Korsnes@ffi.no> writes:
> Is it possible/practical to produce C++ code by first making Ada95 code
> and then from this produce C++ (via Gnat) ? Just a bad idea ?
It should not be possible via GNAT, since GNAT and G++ are two
different front-ends to the same back end. The fact that GNAT
can emit Java byte code is an anomoly to support the Java byte
code engine as a "target". GNAT generally emits either machine
code (in ASCII) or assembler code (I don't know which).
> (I would prefer to make/test Ada95 code rather than C++)
Averstar can sell you an Ada compiler that emits ANSI C, which
might be a subset of C++ (for the subset of ANSI C they use).
But since you wanted C++ you probably wanted it to use features
of C++ that are not in C.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Make C++ via Ada95/Gnat ?
2001-08-16 9:22 ` Larry Kilgallen
@ 2001-08-16 10:36 ` sk
2001-08-16 14:03 ` Larry Kilgallen
2001-08-16 12:01 ` Marc A. Criley
1 sibling, 1 reply; 6+ messages in thread
From: sk @ 2001-08-16 10:36 UTC (permalink / raw)
To: comp.lang.ada
> GNAT generally emits either machine code (in ASCII)
Machine code in ASCII ??? ... how limiting :-)
> or assembler code (I don't know which).
gnatmake -S <filename>
generates an assembly listing (-S goes to gcc rather
than gnatmake).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Make C++ via Ada95/Gnat ?
2001-08-16 9:22 ` Larry Kilgallen
2001-08-16 10:36 ` sk
@ 2001-08-16 12:01 ` Marc A. Criley
1 sibling, 0 replies; 6+ messages in thread
From: Marc A. Criley @ 2001-08-16 12:01 UTC (permalink / raw)
Larry Kilgallen wrote:
>
> In article <9lg0gs$9dv$1@snipp.uninett.no>, Reinert Korsnes <Reinert.Korsnes@ffi.no> writes:
>
> > Is it possible/practical to produce C++ code by first making Ada95 code
> > and then from this produce C++ (via Gnat) ? Just a bad idea ?
>
> It should not be possible via GNAT, since GNAT and G++ are two
> different front-ends to the same back end. The fact that GNAT
> can emit Java byte code is an anomoly to support the Java byte
> code engine as a "target". GNAT generally emits either machine
> code (in ASCII) or assembler code (I don't know which).
_JGNAT_, not GNAT, emits Java byte code.
Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Make C++ via Ada95/Gnat ?
2001-08-16 10:36 ` sk
@ 2001-08-16 14:03 ` Larry Kilgallen
0 siblings, 0 replies; 6+ messages in thread
From: Larry Kilgallen @ 2001-08-16 14:03 UTC (permalink / raw)
In article <mailman.997958311.11304.comp.lang.ada@ada.eu.org>, sk <sknipe@ktc.com> writes:
>> GNAT generally emits either machine code (in ASCII)
>
> Machine code in ASCII ??? ... how limiting :-)
Not to computers, just to humans.
06435834
96754834
23706421
75325326
The only purpose of a symbolic representation is to coddle humans :-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Make C++ via Ada95/Gnat ?
2001-08-16 8:30 Make C++ via Ada95/Gnat ? Reinert Korsnes
2001-08-16 9:22 ` Larry Kilgallen
@ 2001-08-17 1:22 ` Robert Dewar
1 sibling, 0 replies; 6+ messages in thread
From: Robert Dewar @ 2001-08-17 1:22 UTC (permalink / raw)
Reinert Korsnes <Reinert.Korsnes@ffi.no> wrote in message news:<9lg0gs$9dv$1@snipp.uninett.no>...
> Hi,
>
> Is it possible/practical to produce C++ code by first making Ada95 code
> and then from this produce C++ (via Gnat) ? Just a bad idea ?
>
> (I would prefer to make/test Ada95 code rather than C++)
>
> reinert
No, it is not possible to translate Ada to C++ using GNAT, since
in no sense does GNAT translate Ada to either C or C++ during
compilation.
There is no technology I am aware of that can translate Ada code to
high level C++ code, nor is it easy to conceive of anything that
would achieve a 100% translation that resulted in useful and
readable C++, so the conception here is basically flawed. If you
want C++ you must write in C++ :-(
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-08-17 1:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-16 8:30 Make C++ via Ada95/Gnat ? Reinert Korsnes
2001-08-16 9:22 ` Larry Kilgallen
2001-08-16 10:36 ` sk
2001-08-16 14:03 ` Larry Kilgallen
2001-08-16 12:01 ` Marc A. Criley
2001-08-17 1:22 ` Robert Dewar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox