------- Comment #2 from pinskia at gcc dot gnu dot org 2006-12-27 03:16 ------- This patch works for me but I don't know if it is correct, it mirrors other places which uses currently_open_derived_class but we now get a bogus error message with this patch: Index: semantics.c =================================================================== --- semantics.c (revision 120211) +++ semantics.c (working copy) @@ -2854,6 +2859,8 @@ tree path;
path = currently_open_derived_class (DECL_CONTEXT (decl)); + if (!path) + path = DECL_CONTEXT (decl); perform_or_defer_access_check (TYPE_BINFO (path), decl, decl); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30302