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: Warnings, standards and flags


Terry Frankcombe wrote:
Hi folks

Two (and a half?) specific questions, and a more general discussion
point:

Is there any good reason (or at least a rationale) that -std does not
imply -pedantic?

Why does -Wtabs work with -std=gnu, but -std=f95 not allow the
over-ride?


More generally, gfortran---and indeed all of gcc---seems to like to make it really hard for a user to do some fairly obvious things without using 36 dozen flags. Is this considered to be a good thing? Why are "meta flags" not given higher priority? (While this is somewhat understandable given the pedigree of gcc, it's frustrating for users coming to gcc after becoming used to broad-brush behaviour from other specific compilers. Of course sensibility is in the eye of the beholder, but surely the above are two examples where the intent of the user is reasonably obvious, but apparently not really considered by developers?)

The "fairly obvious things" which commercial compilers target with meta-flags don't extend much beyond SPEC benchmarking. Supposing we compare typical options:

ifort [10.0]: -xW -assume protect_parens,byterecl,buffered_io -O2 -g

gfortran -funroll-loops -ftree-vectorize -O2 -g

I don't see much difference in space consumed, except that I don't have an option to set abrupt underflow in gfortran (other than -ffast-math). In practice, I would also want an option to fuse loops more aggressively in ifort; I don't know of such an option for gfortran.
While ifort defaults to -O2 in the absence of -g, depending on that default has not proven consistently practical.



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