diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-20 21:15:44 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-20 21:15:44 +0000 |
commit | 579bb6633b3b384ccc05a53d954e803cb69bb4d2 (patch) | |
tree | 49ec524753ca756a93eb724fe929b9e30035943c /gcc/cp/init.c | |
parent | 192903ebf24a816236c1bcb593d709156e681dd9 (diff) | |
download | gcc-579bb6633b3b384ccc05a53d954e803cb69bb4d2.tar.gz |
PR c++/29475
* cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
extra argument that represents the declaration to use to print
potential error messages.
* init.c (build_offset_ref): Adjusted the call to
perform_or_defer_access_check.
* class.c (alter_access, resolve_address_of_overloaded_function):
Likewise.
* decl.c (make_typename_type, make_unbound_class_template): Likewise.
* search.c (lookup_member): Likewise.
* friend.c (add_friend): Likewise.
* parser.c (cp_parser_template_id,
cp_parser_pre_parsed_nested_name_specifier): Likewise.
* semantics.c (finish_non_static_data_member,
check_accessibility_of_qualified_id, finish_id_expression): Likewise.
(pop_to_parent_deferring_access_checks, perform_access_checks,
perform_or_defer_access_check): Adjusted the call to enforce_access.
* call.c (enforce_access): Use the new extra argument to build the
error message.
(build_op_delete_call): Adjusted the call to
perform_or_defer_access_check.
(build_over_call): Likewise.
PR c++/29475
* g++.dg/template/access19.C: New test.
* g++.old-deja/g++.other/access11.C: Adjusted the line where the
error is reported.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119027 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 0c85c0fe8fd..0ea68882ee9 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1383,9 +1383,9 @@ build_offset_ref (tree type, tree member, bool address_p) (or any class derived from that class). */ if (address_p && DECL_P (t) && DECL_NONSTATIC_MEMBER_P (t)) - perform_or_defer_access_check (TYPE_BINFO (type), t); + perform_or_defer_access_check (TYPE_BINFO (type), t, t); else - perform_or_defer_access_check (basebinfo, t); + perform_or_defer_access_check (basebinfo, t, t); if (DECL_STATIC_FUNCTION_P (t)) return t; @@ -1398,7 +1398,7 @@ build_offset_ref (tree type, tree member, bool address_p) /* We need additional test besides the one in check_accessibility_of_qualified_id in case it is a pointer to non-static member. */ - perform_or_defer_access_check (TYPE_BINFO (type), member); + perform_or_defer_access_check (TYPE_BINFO (type), member, member); if (!address_p) { |