Skip to content

MDN051 superfluous-save ​

warning enabled by default

save in a module specification part.

Why ​

Module variables are saved implicitly since Fortran 2008: the save adds nothing.

Reported ​

fortran
module state
  real, save :: t

Preferred ​

fortran
module state
  real :: t

Suppressing ​

For one occurrence, with the reason on the same line (or alone on the line before the statement):

fortran
! fobis: ignore[MDN051] <why this occurrence is fine>

For the whole project, ignore = MDN051 in the fobos [lint] section.

Equivalent ​

Fortitude rule MOD051 (see Lint Rules).