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

2006-11-08 Thread Andrew Pinski
On Wed, 2006-11-08 at 21:25 -0800, Brooks Moses wrote:

 ---
 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.

We should be able to remove them from c.opt now after the patch in 2005:
2005-11-04  Francois-Xavier Coudert  [EMAIL PROTECTED]

PR fortran/18452
* c.opt: Add a -lang-fortran option.
* c-opts.c: Add a lang_fortran flag.
(c_common_init_options): Handling the -lang-fortran option.
(c_common_handle_option): Add a case for Fortran options in
preprocessing. Remove cases for -ffixed-form and
-ffixed-line-length. Add a case for -lang-fortran.

Thanks,
Andrew Pinski



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

2006-11-08 Thread Brooks Moses
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