[SciPy-Dev] Fortran cleanup advice?
Pauli Virtanen
pav+sp@iki...
Mon Apr 26 13:01:12 CDT 2010
Mon, 26 Apr 2010 21:29:35 +0800, Ralf Gommers wrote:
> Most warnings are from Fortran code, I count six types (examples at end
> of mail):
> 1. Nonconforming tab character. This one's straightforward, change tabs
> to spaces.
> 2. Unused variable.
> 3. Obsolete ASSIGN statement.
> 4. Label defined but not used.
> 5. Obsolete assigned GOTO statement
> 6. 'foo' uninitialized.
I'm not sure whether fixing these warnings pays off:
a) I doubt fixing these warnings will help us spot any bugs. Most of the
offending code is likely upstream code (= ancient Fortran libraries),
and for the most part, they are solid.
At least the warnings (3) and (5) are spurious. Computed gotos are
not an obsolete feature in Fortran-77...
b) In the worst case, stylistic fixes such as the above can cause errors.
c) Moreover, such changes clutter up "svn/git blame" needlessly.
Sometimes, it is useful to want to know what functional Scipy-specific
modifications (= bug-fixes) have been made.
d) If it ain't broke, don't fix it.
Because of these, I would avoid doing purely stylistic fixes to upstream
code.
Scipy-specific code is of course a different matter -- warnings from code
written by Scipy authors should be fixed.
--
Pauli Virtanen
More information about the SciPy-Dev
mailing list