]>
git.ipfire.org Git - thirdparty/gcc.git/commit
fortran: Fix bogus warning with -cpp -fpreprocessed [PR92613]
With -fpreprocessed, gfortran skips the C preprocessor, avoiding
spurious diagnostics about characters in Fortran comments.
PR fortran/92613
gcc/fortran/ChangeLog:
* cpp.cc (gfc_cpp_preprocess): Skip libcpp for -fpreprocessed.
Error out for -fpreprocessed -E.
* f95-lang.cc (gfc_init): Skip libcpp init for -fpreprocessed.
* scanner.cc (gfc_new_file): Load source directly if preprocessed.
* invoke.texi (Preprocessing Options): Document -fpreprocessed.
gcc/testsuite/ChangeLog:
* gfortran.dg/pr92613.f90: New test.
* gfortran.dg/pr92613_2.f90: New test for -E error.
Signed-off-by: Christopher Albert <albert@tugraz.at>