[Bug fortran/34092] New: Should warn about unused private variables
terry at chem dot gu dot se
gcc-bugzilla@gcc.gnu.org
Wed Nov 14 15:17:00 GMT 2007
Consider the following module:
module fred
implicit none
private
integer,parameter::i=1
integer::j
end module fred
With gcc version 4.3.0 20071109 (experimental) (GCC), no warnings are issued:
[tjf@fkpc167 Explore]$ gfortran -Wall -Wextra -c fred.f90
[tjf@fkpc167 Explore]$
Normally those module-level variables should not be warned about as they likely
are accessed in using program units. But in this case they are private to the
module. Unused variables with the private attribute cannot be used elsewhere
and should be warned about as if they were in a main program.
--
Summary: Should warn about unused private variables
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: terry at chem dot gu dot se
GCC host triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34092
More information about the Gcc-bugs
mailing list