This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/61297] New: have an -Wunused-type


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61297

            Bug ID: 61297
           Summary: have an -Wunused-type
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Joost.VandeVondele at mat dot ethz.ch

For the below testcase, would be nice to have a warning -Wunused-type for the
unused type (T), just like we have for unused functions (but I guess the FE
needs to get active for this one).

> cat test.f90
MODULE M
 TYPE T
 END TYPE T
 PRIVATE
CONTAINS
 SUBROUTINE S()
 END SUBROUTINE
END MODULE

> gfortran -c -Wall -Wextra test.f90
test.f90:6:0: warning: âsâ defined but not used [-Wunused-function]
  SUBROUTINE S()
 ^

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]