Error preprocessing a fortran comment
Angelo Graziosi
angelo.graziosi@alice.it
Wed Feb 1 17:24:00 GMT 2017
Just out curiosity, I have seen that many speak about 'fpp' as
preprocessor. Is it usable with gfortran? Should I install some other
packages?
Usually I work on
Windows with MSYS2, MinGW32/64, WSL
macOS with MacPorts
GNU/Linux Mint 18.1 (Mate)
Thanks,
Angelo.
Il 01/02/2017 12:51, Angelo Graziosi ha scritto:
> Hmmm...
>
> Il 01/02/2017 12:25, FX ha scritto:
>>> I wonder if this is to be expected... or if one can exclude comment
>>> from preprocessing.
>>
>> It is expected. \ is a continuation sign for the C preprocessor, and
>> the C preprocessor is run before the Fortran compiler.
>
> I don't think so... Why then removing the "rm -rf" lines works? i.e.
> leaving:
>
> !
> ! gfortran[-mp-X] [-Warray-temporaries] -O3 -Wall \
> ! -Wno-unused-dummy-argument $BLD_OPTS -J ~/programming/modules \
> ! ~/programming/basic-modules/{kind,math}_consts.f90 \
> ! ~/programming/ode-modules/{everhart_integrator,\
> ! cernlib_integrators}.f90 test_jsunp.f90 -o test_jsunp$EXE && \
> !
> ! ./test_jsunp$EXE
>
> works and the lines have the '\'. I think now I have understood the
> culprit. It is the '/*' in those lines which causes the failure. In
> other words, this comment works:
>
> !
> ! rm -rf {*.mod,~/programming/modules} && \
> ! gfortran[-mp-X] [-Warray-temporaries] -O3 -Wall \
> ! -Wno-unused-dummy-argument $BLD_OPTS -J ~/programming/modules \
> ! ~/programming/basic-modules/{kind,math}_consts.f90 \
> ! ~/programming/ode-modules/{everhart_integrator,\
> ! cernlib_integrators}.f90 test_jsunp.f90 -o test_jsunp$EXE && \
> ! rm -rf {*.mod,~/programming/modules}
> !
> ! ./test_jsunp$EXE
>
> maybe '/*' is interpreted as a C open comment...
>
> Thanks in any case,
>
> Angelo.
>
More information about the Fortran
mailing list