This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: patch: [fortran] handle inverses of -ffixed-form and -ffree-form
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org, dnovillo at redhat dot com, jakub at redhat dot com, Richard Henderson <rth at redhat dot com>
- Date: Sat, 10 Dec 2005 23:54:14 -0400
- Subject: Re: patch: [fortran] handle inverses of -ffixed-form and -ffree-form
- References: <20051211000007.GA7685@redhat.com> <20051211013143.GA56037@troutmask.apl.washington.edu>
> I don't understand. Are the SPECgomp files free form or
> fixed form? If the source is free-form, but the comments
> use a c of C in column 1 to denote a comment, then that's
Ok, let me rephrase as I'm new to this whole Fortran nomenclature.
The SPEComp source is in fixed form, so I should be using -ffixed-form.
Due to some unknown bug, which I didn't care enough to investigate,
calling "./f951 --help -v" displays documentation for -ffree-form,
but does NOT display docs for -ffixed-form:
The Fortran front end recognizes the following options:
-I, -Wall, -Wconversion, -ffixed-form, -ffixed-line-length-,
-ffixed-line-length-none, -fopenmp, -fshort-enums
...
-ffree-form Assume that the source file is free form
I missed the -ffixed-form option above, because it had no docs, so I
assumed the sensible thing would be to use -fno-free-form, since .f90
files get compiled as free-form by default.
Since lang.opt accepts the negative of both ffree-form and ffixed-form,
I attempted to fix the switch in options.c.
I don't see why we can't accept the negative, but I really don't care
either way.
The patch below rejects the negative, as suggested.
OK?
* lang.opt: Add RejectNegative to ffixed-form and ffree-form.
Index: lang.opt
===================================================================
--- lang.opt (revision 108121)
+++ lang.opt (working copy)
@@ -110,11 +110,11 @@
Use f2c calling convention
ffixed-form
-Fortran
+Fortran RejectNegative
Assume that the source file is fixed form
ffree-form
-Fortran
+Fortran RejectNegative
Assume that the source file is free form
funderscoring