Re: [S] Fortran compilers

Douglas Bates (
19 Feb 1998 09:52:28 -0600 (Prof Brian Ripley) writes:

> (c) Use f2c and a C compiler, then dyn.load with Watcom, dll.load
> with others. There is a full port of f2c to Win32 at
>, and for most Fortran code
> this is a very viable option. (After all, the GNU Fortran
> compiler is basically f2c + gcc.)

This is a bit off-topic because it is not dealing with the Windows
compilers but on Unix systems there are different pieces of software
that may be considered as the "GNU Fortran compiler". On some systems
there might be a shell script with a name like fort77 that simply
calls f2c on the Fortran code then calls gcc on the resulting C code.
There is also something called g77 (or eg77 in the egcs suite) which
is a native Fortran compiler to accompany gcc. Generally it requires
gcc to be installed for its use because the object-code generation
scheme is that from gcc. It also uses the libraries for the Fortran
intrinsics and for Fortran I/O that accompany f2c. Thus one could
consider it as a merged version of gcc and f2c but, as far as I know,
the front end that parses the Fortran code and generates the
intermediate code is distinct from f2c. It may have borrowed heavily
from f2c, as is traditional and encouraged with open source software,
but it was a separate development effort.

> Given that, in my experience the PC compilers are the picky ones with
> foibles, and I have never had problems moving code to a Sun compiler.
> The sort of problems I have had are with code from statlib written in
> some approximation to ratfor, with character strings enclosed in " ",
> variable dimensions of arrays defined after they are used, code
> after column 72, .... _compilers_ tend to accept standards, but
> _programmers_ do not!

Actually the g77 compiler with the -Wall (all warnings turned on)
option set can be a rather picky compiler too.

BTW, if you wonder about the phrase "open source software", it is the
new buzz-phrase being preferred to "freely available" software or
simply "free software" in the GNU tradition. At least Netscape
prefers that phrase when describing the conditions for the release of
version 5.0 of their browser.

This message was distributed by To unsubscribe
send e-mail to with the BODY of the
message: unsubscribe s-news