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

FX Coudert fxcoudert@gmail.com
Thu Aug 9 22:19:00 GMT 2007


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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module_private.ChangeLog
Type: application/octet-stream
Size: 588 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070809/bfee5327/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module_private.diff
Type: application/octet-stream
Size: 3791 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070809/bfee5327/attachment-0001.obj>


More information about the Gcc-patches mailing list