re PR c++/29048 ("`x' is private" error duplicated when scope specified)

PR c++/29048
        * semantics.c (finish_qualified_id_expr): Avoid duplicate access
        check here, too.

From-SVN: r132261
This commit is contained in:
Steven Bosscher 2008-02-12 17:26:34 +00:00 committed by Jason Merrill
parent e4d25d9dc3
commit 43854f724a
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
PR c++/29048
* semantics.c (finish_qualified_id_expr): Avoid duplicate access
check here, too.
2008-02-12 Jakub Jelinek <jakub@redhat.com>
PR c++/34862

View File

@ -1620,8 +1620,12 @@ finish_qualified_id_expr (tree qualifying_class,
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;