From the helpful gcc manual: [Note 1]
You can specify the input language explicitly with the -x
option:
-x language
Specify explicitly the language for the following input files
(rather than letting the compiler choose a default based on the
file name suffix). This option applies to all following input
files until the next -x
option. Possible values for language
are:
(snip)
f77 f77-cpp-input f95 f95-cpp-input
If you're using a Unix-y system and you took the precaution of installing the gcc documentation package (apt-get install gcc-doc
on debian/ubuntu-like systems), then you could have found that information directly by typing
info gcc --index-search=x
because the GCC info files are index by option name. Most of the time you don't need to type --index-search=
; info gcc x
would suffice.
Notes:
- In case it's not obvious,
gfortran
is just another front-end for the Gnu compiler collection ("gcc" for short), and accepts any options that would be accepted by the gcc
command.