diff options
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 967b00a4b66..7f6af726898 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -768,6 +768,7 @@ compute_access (basetype_path, field) tree types; tree context; int protected_ok, via_protected; + extern int flag_access_control; #if 1 /* Replaces static decl above. */ tree previous_scope; @@ -776,6 +777,9 @@ compute_access (basetype_path, field) ((TREE_CODE (field) == FUNCTION_DECL && DECL_STATIC_FUNCTION_P (field)) || (TREE_CODE (field) != FUNCTION_DECL && TREE_STATIC (field))); + if (! flag_access_control) + return access_public; + /* The field lives in the current class. */ if (BINFO_TYPE (basetype_path) == current_class_type) return access_public; |