This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[gfortran,patch] Add -fmodule-private option (PR 31629)


The attached simple patch adds a -fmodule-private option to make module entities private as default, i.e. when you USE a module and compile with this option, you cannot refer to any variable that wasn't explicitly declared as PUBLIC. This is a tool and help for some people's coding style.

It's very simple as the code was already factored nicely, so it's in fact a one-liner (plus option-handling stuff, documentation and testcase). Bootstrapped and regtested on x86_64-linux, OK to commit?

FX



:ADDPATCH fortran:

Attachment: module_private.ChangeLog
Description: Binary data

Attachment: module_private.diff
Description: Binary data


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