[gfortran,patch] Remove warning using gfortran -pipe

FX Coudert fxcoudert@gmail.com
Sat Jun 24 12:39:00 GMT 2006


The patch below changes the options passes to f951 after preprocessing 
for files in the @f95-cpp-input category (.F90 and .F95). Passing 
explicitly -ffree-form to f951 removes the following warning:

$ gfortran -pipe a.F90
Warning: Reading file '<stdin>' as free form.

This is PR fortran/23862, and the patch has been proposed for the first 
time in 2005! Unless someone objects, I plan to commit that to mainline 
in 24 hours, and 4.1 a week (or more) after.

FX


Index: lang-specs.h
===================================================================
--- lang-specs.h        (revision 114791)
+++ lang-specs.h        (working copy)
@@ -22,7 +22,7 @@
    "cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN 
%(cpp_options) \
        %{E|M|MM:%(cpp_debug_options)}\
        %{!M:%{!MM:%{!E: -o %|.f95 |\n\
-    f951 %|.f95 %(cc1_options) %{J*} %{I*}\
+    f951 %|.f95 %{!ffixed-form:-ffree-form} %(cc1_options) %{J*} %{I*}\
        -fpreprocessed %{!nostdinc:-I finclude%s} 
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
  {".f90", "@f95", 0, 0, 0},
  {".f95", "@f95", 0, 0, 0},



More information about the Gcc-patches mailing list