warning for for unused labels incorrect

Jack Howarth howarth@bromo.msbb.uc.edu
Sat Mar 18 06:19:00 GMT 2006


   While doing a test compile of xplor-nih with the -Wall
flag, I discovered a glitch in the scanning for unused labels.
One fortran file reported a number of warnings of the form...

9999  ERROR=.TRUE.                                                             
   1
Warning: Label 9999 at (1) defined but not used
 In file util.f:178

The label was in fact being used in that file but it occurs
in a read statement...

         READ(UNIT,'(/I8)',ERR=9999,END=8888) NTITLE

So it appears that the arguments for i/o statements aren't examined
when the compiler checks for uses of defined labels.
          Jack



More information about the Fortran mailing list