diff options
| author | Simon Martin <simartin@users.sourceforge.net> | 2006-11-20 21:15:44 +0000 |
|---|---|---|
| committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2006-11-20 21:15:44 +0000 |
| commit | 02022f3a706d462cdb2da30e2d8cfd79901d78ab (patch) | |
| tree | 49ec524753ca756a93eb724fe929b9e30035943c /gcc/cp/parser.c | |
| parent | 903ff2758bdad932eee6ae84539361c18e6c45e9 (diff) | |
| download | gcc-02022f3a706d462cdb2da30e2d8cfd79901d78ab.zip gcc-02022f3a706d462cdb2da30e2d8cfd79901d78ab.tar.gz gcc-02022f3a706d462cdb2da30e2d8cfd79901d78ab.tar.bz2 | |
re PR c++/29475 (incomplete template diagnostics.)
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.
From-SVN: r119027
Diffstat (limited to 'gcc/cp/parser.c')
| -rw-r--r-- | gcc/cp/parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 8d25db6..8e79eab 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -8759,6 +8759,7 @@ cp_parser_template_id (cp_parser *parser, /* Perform any access checks that were deferred. */ for (check = TREE_PURPOSE (value); check; check = TREE_CHAIN (check)) perform_or_defer_access_check (TREE_PURPOSE (check), + TREE_VALUE (check), TREE_VALUE (check)); /* Return the stored value. */ return TREE_VALUE (value); @@ -16643,7 +16644,9 @@ cp_parser_pre_parsed_nested_name_specifier (cp_parser *parser) value = cp_lexer_consume_token (parser->lexer)->value; /* Perform any access checks that were deferred. */ for (check = TREE_PURPOSE (value); check; check = TREE_CHAIN (check)) - perform_or_defer_access_check (TREE_PURPOSE (check), TREE_VALUE (check)); + perform_or_defer_access_check (TREE_PURPOSE (check), + TREE_VALUE (check), + TREE_VALUE (check)); /* Set the scope from the stored value. */ parser->scope = TREE_VALUE (value); parser->qualifying_scope = TREE_TYPE (value); |
