A weirdness in fortran/lang.opt, c.opt, and "cc1 --help".

Brooks Moses brooks.moses@codesourcery.com
Thu Nov 9 06:19:00 GMT 2006


There's something weird going on with Fortran's -ffixed-line-length 
options, and in how the lang.opt files get processed to produce the 
--help results from cc1 (and cc1plus, f951, etc.).

Specifically, the fortran/lang.opt file contains the following lines:

-----------------------------------------------------------------------
ffixed-line-length-none
Fortran RejectNegative
Allow arbitrary character line width in fixed mode

ffixed-line-length-
Fortran RejectNegative Joined UInteger
-ffixed-line-length-<n>	   Use n as character line width in fixed mode
-----------------------------------------------------------------------

These are, so far as I know, quite definitely Fortran-specific concepts, 
and thus the options only make sense in Fortran.  However, there are 
also the following rather mysterious lines in c.opt:

-----------------------------------------------------------------------
ffixed-line-length-none
C ObjC

ffixed-line-length-
C ObjC Joined
-----------------------------------------------------------------------

Thus, when one runs "cc1 --help" or "f951 --help", these lines of 
documentation show up under the C section, not under the Fortran section.

As best I can tell, these options are not actually handled in C or ObjC; 
grepping for OPT_ffixed in the gcc directory only finds the handling of 
the global "-ffixed-*" option in opts.c.  And there's no mention of them 
in the GCC manual.

Thus: Are these lines in c.opt irrelevant, or do they do something 
meaningful?  Should they be there at all?  If I introduce some other 
options starting with "ffixed", do I need to add similar lines for them 
in c.opt?

- Brooks



More information about the Gcc mailing list