[gfortran] gfortran options and cc1 warnings

FX Coudert fxcoudert@gmail.com
Mon Oct 31 00:18:00 GMT 2005


This is a patch proposal about PR fortran/18452. In short, to preprocess 
fortran source files, gfortran calls cc1 with its own options, which 
gives warnings like:

$ gfortran -fdollar-ok a.F90
cc1: warning: command line option "-fdollar-ok" is valid for F95 but not 
for C

A few (two exactly) options were already handled right (-ffixed-form and 
-ffixed-line-length-n), so I applied the method used for those to all 
gfortran options. Questions that need adressing are:

   1. can we get that patch in during the short period when 4.1 will 
unfreeze before branching? it concerns the common code of GCC, and does 
not fix a regression strictly speaking. But that problem is very 
annoying to both users (which make compiling very noisy and errors 
difficult to spot) and developers (preventing libgfortran to be built 
with -Werror), and working around it while changing only gfortran code 
would be *ugly*.

   2. what should be the behaviour of "gfortran -fdollar-ok a.f b.c"? is 
this supposed to be allowed, or not?

   3. if the answer to point 2 is "this isn't allowed", then the 
testsuite framework should be somehow modified :)

   4.  in the case it is allowed, we then need some very clever way to 
get options go where they need (C-only options for b.c and Fortran-only 
options to a.f)

gfortran developers, C front-end maintainers, specs gurus, release 
managers, please speak up! :)

FX
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: preproc.ChangeLog
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20051031/179c89c9/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: preproc.diff
Type: text/x-patch
Size: 6424 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20051031/179c89c9/attachment.bin>


More information about the Gcc mailing list