gfortran: enabling specific warnings for a used but not set variable, and a set but not used variable

Laurent IBGUI laurent.ibgui@obspm.fr
Fri Dec 25 12:14:00 GMT 2015


Dear Madam, dear Sir,

I am intensively developing scientific codes in Fortran. In particular, I use gfortran. Would it be possible to include in gfortran the following features that are available in the non longer updated (as it appears) g95 compiler:

 warning (113) in g95: a variable is used but not set, i.e., uninitialized (case of i below):
 warning (112) in g95: a variable is set but never used (case of j below)    (-Wunused-but-set-variable   does not provide any message with gfortran 5.3.0)


      IMPLICIT NONE
      INTEGER(kind=4) :: i,j

      print *, 'i =',i
      j = 0

      END


Thank you so much for your help, and also, for the great work you are doing with this gfortran and gcc extremely useful project.

Best regards,
Laurent Ibgui.



More information about the Gcc mailing list