re PR c++/20022 (-fno-access-control is broken)

gcc/cp/ChangeLog:
PR c++/20022
* semantics.c (perform_deferred_access_checks): Use
get_deferred_access_checks to get the top of the stack.
gcc/testsuite/ChangeLog:
PR c++/20022
* g++.dg/other/access3.C: New.

From-SVN: r95174
This commit is contained in:
Alexandre Oliva 2005-02-17 16:42:09 +00:00 committed by Alexandre Oliva
parent eae600b906
commit 856a4ce60e
4 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-02-17 Alexandre Oliva <aoliva@redhat.com>
PR c++/20022
* semantics.c (perform_deferred_access_checks): Use
get_deferred_access_checks to get the top of the stack.
2005-02-15 Alexandre Oliva <aoliva@redhat.com>
PR c++/17788

View File

@ -285,8 +285,7 @@ perform_deferred_access_checks (void)
{
tree deferred_check;
for (deferred_check = (VEC_last (deferred_access, deferred_access_stack)
->deferred_access_checks);
for (deferred_check = get_deferred_access_checks ();
deferred_check;
deferred_check = TREE_CHAIN (deferred_check))
/* Check access. */

View File

@ -1,3 +1,8 @@
2005-02-17 Alexandre Oliva <aoliva@redhat.com>
PR c++/20022
* g++.dg/other/access3.C: New.
2005-02-17 Ira Rosen <irar@il.ibm.com>
* gcc.dg/vect/vect-98.c: New test.

View File

@ -0,0 +1,13 @@
// { dg-do compile }
// { dg-options "-fno-access-control" }
// PR c++/20022
// Make sure -fno-access-control doesn't crash, and actually grants at
// least some access.
class B {
enum A {};
};
B::A r;