------- Comment #3 from steven at gcc dot gnu dot org 2006-10-12 21:22 ------- I thought it would simply be a matter of using TREE_NO_WARNING ... until I realized this was not a warning but an error.
Anyway, following the method of the fix for PR19375, I bootstrapped and tested this patch below, but since this is a language issue and my understanding of C++ is non-existing, I'm unassigning myself from this PR. Index: semantics.c =================================================================== --- semantics.c (revision 117672) +++ semantics.c (working copy) @@ -1559,8 +1559,12 @@ finish_qualified_id_expr (tree qualifyin transformation, as there is no "this" pointer. */ ; else if (TREE_CODE (expr) == FIELD_DECL) - expr = finish_non_static_data_member (expr, current_class_ref, - qualifying_class); + { + push_deferring_access_checks (dk_no_check); + expr = finish_non_static_data_member (expr, current_class_ref, + qualifying_class); + pop_deferring_access_checks (); + } else if (BASELINK_P (expr) && !processing_template_decl) { tree fns; -- steven at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|steven at gcc dot gnu dot |unassigned at gcc dot gnu |org |dot org Status|ASSIGNED |NEW http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29048