This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: -cpp and 'include'
On Mon, May 18, 2009 at 00:44, Tobias Burnus <burnus@net-b.de> wrote:
> Tom,
>
> Tom Browder wrote:
>> Is this correct behavior:
>>
>> main.f:
>> ----------
>> ? ? ? program main
>> ? ? ? include "include.inc"
> Here, it is unclear whether "include.inc" should be run through CPP or
> not. Most compilers (including gfortran) don't run "include.inc" through
> CPP, some do. The simplest would be to replace Fortran's ? include
> "include.inc" ? ?by CPP's ? #include "include.inc".
>
> There was some discussion whether gfortran -cpp also should use CPP for
> "include" but the outcome was non-conclusive with inclination to keep
> the status quo.
I tested the same code that with g95 and Sun f95 and they also error out there.
However, it seems to me that if pre-processing is going to be done
that it should be done on ALL the code.
(I would like to change my code to solve the problem but unfortunately
it isn't up to me at the moment.)
Thanks, Tobius.
Regards,
-Tom