https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118161
Bug ID: 118161
Summary: Better preprocessing in gfortran
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: clogged.drainpipe at gmail dot com
Target Milestone: ---
The state of preprocessing is not great in Fortran. Coco is dead and gone, and
nothing got standardized instead. Gfortran supports running the C preprocessor
in "traditional" mode, where it emulates the behavior of ancient pre-89 C
preprocessors to not step on the toes of any Fortran source files.
This is unfortunate for me, as I am using a preprocessor feature (concatenation
with ##) that is only in C89 and later, forcing me to run
cpp -P -std=c89 interface.F08 | gfortran ...
instead of simply telling gfortran to use a different preprocessing standard.
This works at the moment, but not really ideal. I am lucky enough to be able to
write the few Fortran files I need the preprocessor for with statements that do
not get broken by -std=c89, but I feel like there ought to be some better way.