From 23010bc8bc657b65d1b0ea5a52f66339c39dc81b Mon Sep 17 00:00:00 2001 From: mmitchel Date: Tue, 16 May 2006 05:39:49 +0000 Subject: PR c++/27339 * cp-tree.h (perform_access_checks): New function. * semantics.c (perform_access_checks): New function. (perform_deferred_access_checks): Use it. * parser.c (cp_parser_simple_declaration): Adjust call to cp_parser_init_declarator. (cp_parser_type_parameter): Do not defer checks in default arguments. (cp_parser_explicit_specialization): Adjust call to cp_parser_single_declaration. (cp_parser_init_declarator): Perform template-parameter access checks. (cp_parser_parameter_declaration): Do not defer checks for template parameter default arguments. (cp_parser_template_declaration_after_export): Gather access checks for template parameters, and pass them to cp_parser_single_declaration. (cp_parser_template_parameter_access_checks): New function. (cp_parser_single_declaration): Add checks parameter. PR c++/27339 * g++.dg/parser/access8.C: Adjust error marker. * g++.dg/template/access17.C: New test. * g++.dg/template/access18.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113819 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/cp-tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/cp/cp-tree.h') diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 8e56a9fc528..38376288ef9 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -4153,6 +4153,7 @@ extern void stop_deferring_access_checks (void); extern void pop_deferring_access_checks (void); extern tree get_deferred_access_checks (void); extern void pop_to_parent_deferring_access_checks (void); +extern void perform_access_checks (tree); extern void perform_deferred_access_checks (void); extern void perform_or_defer_access_check (tree, tree); extern int stmts_are_full_exprs_p (void); -- cgit v1.2.1