Error preprocessing a fortran comment
Angelo Graziosi
angelo.graziosi@alice.it
Wed Feb 1 11:51:00 GMT 2017
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