Fortran to C translator

Arnold Robbins arnold at gatech.CSNET
Thu Jun 13 03:40:23 AEST 1985


> In article <> nunes at utai.UUCP writes:
> >
> >   A friend of mine is looking for a Fortran to C translator. The names
> >of translators, the names of their manufactures, and possibly any
> >useful information about them would be greatly appreciated.
> >   Thanks in advance.
> 
> I don't have an answer... but the documentation to the unix f77 compiler
> states that the compiler produces intermediate C code.  In the past I've 
> looked further through the documentation for a command-line option which
> would allow the user to trap the output at this level... [.....]
> 
> Peter S. Shenkin			philabs!cubsvax!peters

No, no, no!  The f77 compiler does not produce intermediate C code, it
produces C intemediate code! There's a difference.  When PCC was designed,
it was done as a front end and back end.  The front end reads C and produces
an intermediate code (mixed assembly language and triples), and the back
end reads this and produces full assembly language.

The f77 front end reads Fortran 77 and produces the same intermediate code.
The compilers share the back end, optimizer (which optimizes the assembly),
and assembler and loader.  Berkeley's Pascal compiler also uses the same
back end.  See the August '78 Bell System Technical Journal article on porting
C and Unix.

There are Pascal compilers out in the real world that read Pascal and generate
C. Whitesmith's does (reportedly), and also HCR Pascal, but it is a lot
harder to do with Fortran.
-- 
Arnold Robbins
CSNET:	arnold at gatech	ARPA:	arnold%gatech.csnet at csnet-relay.arpa
UUCP:	{ akgua, allegra, hplabs, ihnp4, seismo, ut-sally }!gatech!arnold

How come nobody likes good ideas when they don't come up with them?



More information about the Comp.lang.c mailing list