aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2003-05-10 11:29:53 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2003-05-10 11:29:53 +0000
commit78757caa17dac295834129518cffc87f778cf66f (patch)
treec56f80b0b8d2950e80b44d92a5f02235bdc24b54 /gcc/cp/cp-tree.h
parent8d241e0b5734bb89d46fc9b6884f78ad70ff453c (diff)
downloadgcc-78757caa17dac295834129518cffc87f778cf66f.zip
gcc-78757caa17dac295834129518cffc87f778cf66f.tar.gz
gcc-78757caa17dac295834129518cffc87f778cf66f.tar.bz2
re PR c++/9252 ([New parser] Errors due to legally used "typename")
PR c++/9252 * cp-tree.h (saved_scope): Remove check_access field. (tsubst_flags_t): Remove tf_parsing. * decl.c (maybe_push_to_top_level): Don't initialize scope_chain->check_access. (make_typename_type, make_unbound_class_template): Don't use tf_parsing. (register_dtor_fn): Use push/pop_deferring_access_checks instead of scope_chain->check_access. * method.c (use_thunk): Likewise. * parser.c (cp_parser_explicit_instantiation (cp_parser_constructor_declarator_p): Don't call push/pop_deferring_access_checks here. (cp_parser_template_argument, cp_parser_class_name): Don't use tf_parsing. (yyparse): Check flag_access_control. * pt.c (instantiate_class_template): Call push/pop_deferring_access_checks. * semantics.c (push_deferring_access_checks): Propagate dk_no_check. (perform_or_defer_access_check): Make sure basetype_path is a type before comparison. * call.c (build_op_delete_call, build_over_call): Use perform_or_defer_access_check. * class.c (alter_access): Likewise. * init.c (build_offset_ref): Likewise. * lex.c (do_identifier): Likewise. * method.c (hack_identifier): Likewise. * search.c (lookup_member): Likewise. * semantics.c (finish_non_static_data_member): Likewise. (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks instead of flag_access_control. * g++.dg/parse/access8.C: New test. * g++.dg/parse/access9.C: New test. From-SVN: r66660
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 89d068a..3398398 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -696,7 +696,6 @@ struct saved_scope GTY(())
int x_processing_specialization;
bool x_processing_explicit_instantiation;
int need_pop_function_context;
- int check_access;
struct stmt_tree_s x_stmt_tree;
@@ -3013,10 +3012,8 @@ typedef enum tsubst_flags_t {
tf_ignore_bad_quals = 1 << 3, /* ignore bad cvr qualifiers */
tf_keep_type_decl = 1 << 4, /* retain typedef type decls
(make_typename_type use) */
- tf_ptrmem_ok = 1 << 5, /* pointers to member ok (internal
+ tf_ptrmem_ok = 1 << 5 /* pointers to member ok (internal
instantiate_type use) */
- tf_parsing = 1 << 6 /* called from parser
- (make_typename_type use) */
} tsubst_flags_t;
/* The kind of checking we can do looking in a class hierarchy. */