aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorBrooks Moses <brooks@gcc.gnu.org>2006-11-10 14:34:26 -0800
committerBrooks Moses <brooks@gcc.gnu.org>2006-11-10 14:34:26 -0800
commit131ac5dd47998ba7cb0876c6b49a99d9ea47bb1e (patch)
tree444fe166a7d0551449b35143bf1e1a903c7c7c3f /gcc/fortran/module.c
parent3e916873cb9c0e4a7865a06be6f0d4a714c7617e (diff)
downloadgcc-131ac5dd47998ba7cb0876c6b49a99d9ea47bb1e.zip
gcc-131ac5dd47998ba7cb0876c6b49a99d9ea47bb1e.tar.gz
gcc-131ac5dd47998ba7cb0876c6b49a99d9ea47bb1e.tar.bz2
lang.opt (-fmodule-private): Remove option.
* 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. (Also fixed tab-damage in preceeding changelog entry.) From-SVN: r118668
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 77ac0e9..92517d8 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -3413,7 +3413,10 @@ read_module (void)
/* Given an access type that is specific to an entity and the default
- access, return nonzero if the entity is publicly accessible. */
+ access, return nonzero if the entity is publicly accessible. If the
+ element is declared as PUBLIC, then it is public; if declared
+ PRIVATE, then private, and otherwise it is public unless the default
+ access in this context has been declared PRIVATE. */
bool
gfc_check_access (gfc_access specific_access, gfc_access default_access)
@@ -3424,12 +3427,7 @@ gfc_check_access (gfc_access specific_access, gfc_access default_access)
if (specific_access == ACCESS_PRIVATE)
return FALSE;
- if (gfc_option.flag_module_access_private)
- return default_access == ACCESS_PUBLIC;
- else
- return default_access != ACCESS_PRIVATE;
-
- return FALSE;
+ return default_access != ACCESS_PRIVATE;
}