From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,ba3d134fb7efbf1d X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,ba3d134fb7efbf1d X-Google-Attributes: gid103376,public From: jsa@organon.com (Jon S Anthony) Subject: Re: ADA to C++ translator Date: 1996/07/16 Message-ID: #1/1 X-Deja-AN: 168538764 sender: news@organon.com (news) references: <31E51319.41C6@taec.enet.dec.com> <31EA1575.176C@dra.hmg.gb> organization: Organon Motives, Inc. newsgroups: comp.lang.c++,comp.lang.ada Date: 1996-07-16T00:00:00+00:00 List-Id: In article <31EB53A9.663E@dra.hmg.gb> Simon A Watts writes: > > You remember incorrectly. GNAT is *NOT* and *never has been* an Ada95 to C > > translator. The GNAT front end (written in Ada95, I might add) compiles Ada95 > > source code to an intermediate representation. The GNU back end takes the > > intermediate representation and produces *object code*. There is also a gcc front > > end and a g++ front end (which compiles C and C++ to the same intermediate > > representation before giving it to the same backend) available from > > prep.ai.mit.edu/pub/gnu. > > > > There is an excellent paper at cs.nyu.edu/pub/gnat that describes this process. The > > only C code generation that takes place is during binding, which ensures that all > > the program units are properly elaborated before invoking the users' main program. > > > > Would that explain the *.c files left after using GNAT under NT? I do > not use Ada, and was only trying it out with the test files with the > issue. I also (having reinstalled GNU tools) do not have it available at > this time. You only get a C file for the generated sequence of elaboration code. This is there so that it is easy for you to have a C main program with Ada stuff. From the C main you call the elaboration routine before you call any Ada stuff. /Jon -- Jon Anthony Organon Motives, Inc. 1 Williston Road, Suite 4 Belmont, MA 02178 617.484.3383 jsa@organon.com