diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-03-26 08:37:27 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2001-03-26 08:37:27 +0000 |
commit | 788bf0e34ebec318ef42f6a7ffd9e8632756908a (patch) | |
tree | e80deebc6a447417a1ef0f9eae56f55fd7dabfbb /gcc/cp/parse.y | |
parent | 04c5433d684a6e22d266a2bd067eb42e28ee9d60 (diff) | |
download | gcc-788bf0e34ebec318ef42f6a7ffd9e8632756908a.tar.gz |
Implement DR 209
cp:
Implement DR 209
* cp-tree.h (skip_type_access_control,
reset_type_access_control): Prototype.
* decl.c (grokdeclarator): Access of friends is not checked.
* parse.y (component_decl_list): Reset type access control.
* semantics.c (decl_type_access_control): Clear
current_type_lookups.
(save_type_access_control): Don't save if not deferring.
(skip_type_access_control, reset_type_access_control): New
functions.
(begin_class_definition): Do type access control for basetypes.
Start deferred access control.
(finish_class_definition): Resume immediate access control if
this is a local class.
testsuite:
* g++.old-deja/g++.other/friend12.C: New test.
* g++.old-deja/g++.other/friend9.C: Expect no errors.
* g++.old-deja/g++.robertl/eb56.C: Make typedef public.
From-SVN: r40841
Diffstat (limited to 'gcc/cp/parse.y')
-rw-r--r-- | gcc/cp/parse.y | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 3d4ab4400f6..f13614b750a 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -2548,11 +2548,13 @@ component_decl_list: { finish_member_declaration ($1); current_aggr = NULL_TREE; + reset_type_access_control (); } | component_decl_list component_decl { finish_member_declaration ($2); current_aggr = NULL_TREE; + reset_type_access_control (); } ; |