This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Please modify GCC to preprocess *.F90 files like it does *.F files
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Please modify GCC to preprocess *.F90 files like it does *.F files
- From: Charlie Zender <zender at uci dot edu>
- Date: Tue, 29 Aug 2000 13:39:43 -0700
- Reply-To: Charlie Zender <zender at uci dot edu>
Hi,
This is not a bug report but rather a (hopefully simple) feature request.
It is often useful to preprocess fortran code with a C-preprocessor.
It would be really great if the preprocessor component of GCC were
modified to treat *.F90 (Fortran 90) files exactly as it treats *.F files.
This is not currently the case. In order to generate file
dependencies, for example, I have two IDENTICAL files, f.F and f.F90,
zender@dust:~/f$ gcc -E -M -DLINUX -I. -I/home/zender/include -I/usr/local/include f.F
f.F.o: f.F dbg.com xtr.com /usr/local/include/netcdf.inc
which is somewhat buggy (f.F.o should be f.o) but can be fixed with a
simple filter. On the other hand,
zender@dust:~/f$ gcc -E -M -DLINUX -I. -I/home/zender/include -I/usr/local/include f.F90
gcc: f.F90: linker input file unused since linking not done
does not generate any dependencies. Hopefully this is easy to
fix and just involves processing '.F90' files just like '.F' files.
Please consider making the appropriate modifications to GCC.
Add -x f or -x fortran to the gcc command line to change the language
to fortran does not work, since these are not supported languages:
zender@dust:~/f$ gcc -x f -E -M -DLINUX -I. -I/home/zender/include -I/usr/local/include fff.F90
gcc: language f not recognized
gcc: fff.F90: linker input file unused since linking not done
Thanks,
Charlie
--
Charlie Zender zender@uci.edu (949) 824-2987/FAX-3256, Department of
Earth System Science, University of California, Irvine CA 92697-3100
Visiting NCAR CGD CMS July 24--September 22: (303) 497-1616/FAX-1324