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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e552d8828cec1fc7 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!wn11feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Is it possible to translate ada program to C using GCC or other Reply-To: no to spamers (No@email.given.org) References: <334c1c0a-0c49-49d3-b03b-867c2288159c@25g2000hsx.googlegroups.com> <822c5e24-bd20-458d-8346-ba22994aa850@d45g2000hsc.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Wed, 23 Jul 2008 07:01:33 GMT NNTP-Posting-Host: 12.64.120.218 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1216796493 12.64.120.218 (Wed, 23 Jul 2008 07:01:33 GMT) NNTP-Posting-Date: Wed, 23 Jul 2008 07:01:33 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:1273 Date: 2008-07-23T07:01:33+00:00 List-Id: First to clarify, the compiling process. Normally to compile a program step 1. gnat compile .adb step 2. gnat bind .ali or gnatbind .ali this program creates two files: 1. b~.adb 2. b~.ads step 3. gnat link .ali or gnatlink .ali this program compiles the package b~.adb and then finishes the linking process. Note: After linking the b~.* files are deleted. but in step two and three you can use step 2. gnat bind -C .ali or gnatbind -C .ali this creates one file: 1. b_.c this file is equivalence to the package file: b~.adb step 3. gnat link -C .ali or gnatlink -C .ali this program compiles the C binder file b_.c and then finishes the linking process. Note: After linking the b_.* files are deleted. As for the thesis, I am not sure, you might be able to find it. There is a "Jeffrey Skinner" that is into web designing. Maybe he is the same guy, so I would suggest, that you email and ask him. The only problem I see will be that the Ada translator and source code will be based on Ada 83 specs. www.jeffreyskinner.com Jeffrey Skinner. email: jeff [at] jeffreyskinner aka jeff@jeffreyskinner In <822c5e24-bd20-458d-8346-ba22994aa850@d45g2000hsc.googlegroups.com>, climber.cui@gmail.com writes: >On Jul 22, 8:45 pm, a...@anon.org (anon) wrote: >> No! >> >> In GNAT the compiler generates assembly code. With one exception that is >> "GNATBIND" program. Using the "-C" option, GNATBIND with produce its >> binder program in C. But that does very little for what most people want. >> >> A thesis, back in 1991 by Jeffrey Skinner, was in titled "Ada2C: An >> ADA-To-C Program Translator" but it seams that today, most "Ada2C" >> programs have more to do with homework assignments than actual working >> programs. >> >Any chance to get ADA to be translated to something readable, like ADA >code plus run-time calls to its runtime system and pthread library? >By the way, how to use GNAT to compile ada program into assembly code? >I use gcc with -S option, but did not get anything but an assembly >program with no body. > >tony >