This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37032] including "file.F90" - no CPP processing
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Aug 2008 06:12:43 -0000
- Subject: [Bug fortran/37032] including "file.F90" - no CPP processing
- References: <bug-37032-16565@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from burnus at gcc dot gnu dot org 2008-08-06 06:12 -------
> Does the Fortran standard mention preprocessing at all?
Yes, part 3 of the Fortran standard is about preprocessing ("Conditional
Compilation", "CoCo"), however, to my knowledge hardly anyone uses it and no
compiler implements it. (There exists a Fortran program which can be used as
coco preprocessor, see link below.)
The de-facto standard for preprocessing is CPP (C Pre Processor) sometimes also
called FPP. However, this is only standardized for C and not for Fortran, which
causes issues as not every compiler acts the same. Issues:
1. Are newer CPP features supported?
2. Are Fortran "INCLUDE"d files also preprocessed?
gfortran/netlib's fpp/NAG f95/openf95/sunf95: (1) no,(2) no
g95: no/yes
ifort: yes/no,
(There are plans to support (1) in gfortran, see PR 28662.)
> Is a copy of the standard freely available?
Yes and no. The latest drafts before the standard went to ISO are available for
free, which are said to be the same except for layout. See links at
http://gcc.gnu.org/wiki/GFortranStandards
> I would like for this to work with as many different compilers and
> systems as possible.
Then I really suggest to use #include "...", which should work with any
compiler which does CPP preprocessing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37032