j3-fortran / fortran_proposals

Proposals for the Fortran Standard Committee
178 stars 15 forks source link

Default module variables to `protected` #308

Open MicEsp22 opened 1 year ago

MicEsp22 commented 1 year ago

Allow for defaulting module variables to protected:

module <ModuleName>
   [<use statements>]
   implicit none
   protected         ! Currently only  public/private

   [...]
end module [<ModuleName>]

In such a case, protected access specifier would imply default public visibility for procedures/interfaces/DTs defined within the same module.