[patch, fortran] Remove -fmodule-private option.

Brooks Moses brooks.moses@codesourcery.com
Fri Nov 10 21:54:00 GMT 2006


I mentioned this idea in another post which didn't get any immediate yay 
or nay replies, and the patch has finished regtesting, so I might as 
well go ahead and post it.  For the record, my justification for 
removing the option is (quoted from the other post):

> I have found no references to this in the 
> changelog, nor in the mailing list archives, nor in the testsuite, nor 
> even in Google.  Personally, I don't think it's a good option -- at 
> best, it might be useful for checking a programming style that requires 
> everything public to be explicitly declared such, but using it for 
> anything other than checking purposes is merely enabling sloppy 
> nonstandard coding.  Moreover, using it for checking also is poor, since 
> it doesn't check for default-public module entities that aren't used 
> outside the module.
> 
> Thus, I propose that -fmodule-private should be removed.  If there's any 
> call for such a thing for checking purposes, it IMO would be better 
> served by a warning option like -Wmodule-default-public which would warn 
> about code that violates the desired coding style, rather than changing 
> the semantics.

I'll note a slight correction -- on a second Google check, I did find 
references to this option in the various online copies of the g95 
manual, but that's the only place other than various gfortran patches 
that happened to be near it in lang.opt or whatnot.

----------------------------------------------------------------------
2006-11-10  Brooks Moses  <brooks.moses@codesourcery.com>

	* lang.opt (-fmodule-private): Remove option.
	* gfortran.h (gfc_option_t): Remove module_access_private flag.
	* options.c (gfc_init_options): Remove initialization for it.
	(gfc_process_option): Remove handling for -fmodule-private.
	* module.c (gfc_check_access): Add comments, remove check for
	gfc_option.flag_module_access_private.

----------------------------------------------------------------------

Regtested on i686-pc-linux-gnu.  Ok for trunk?

- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module-private.diff
Type: text/x-patch
Size: 2533 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061110/1cfe00a2/attachment.bin>


More information about the Gcc-patches mailing list