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: Explosion of noise from -Wall


On Aug 21 2012, Steve Kargl wrote:

While I can appreciate the value of the new warnings recently added to gfortran, it seems the automatic inclusion of these options when -Wall is used causes an explosion of noise.

-Wall at one time was usable to find questionable code. Now one needs to do '-Wall -Wno-conversion -Wno-compare-real'
to silence a large amount of false positives. I don't
have CP2K or Damian's code available, it may be interesting
to see what happens with a fairly modern codebase.

I disagree in the case of the conversions. I have just run a check on which ones it warns about, and they are all common causes of serious errors. Better languages, like Algol 68, made implicit narrowing coercions an error - so you would HAVE to fix them. The only reason that any reasonable Fortran programmer ever uses them is because of the utterly ghastly specification of the INT, REAL and COMPLEX intrinsics.

Real and complex comparison is more moot, and there is a good
case for putting it in -Wextra.  While 90% of such cases are
questionable code, there are a fair number of reasonable uses.
The same applies to underflow, for very similar reasons, and
the trapping of that lost out in the 1970s.


Regards, Nick Maclaren.


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