This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch: [fortran] handle inverses of -ffixed-form and -ffree-form


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]