This is the mail archive of the
mailing list for the GCC project.
gfortran: enabling specific warnings for a used but not set variable, and a set but not used variable
- From: Laurent IBGUI <laurent dot ibgui at obspm dot fr>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 25 Dec 2015 13:16:49 +0100
- Subject: gfortran: enabling specific warnings for a used but not set variable, and a set but not used variable
- Authentication-results: sourceware.org; auth=none
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)
INTEGER(kind=4) :: i,j
print *, 'i =',i
j = 0
Thank you so much for your help, and also, for the great work you are doing with this gfortran and gcc extremely useful project.