aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2003-05-10 15:58:45 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2003-05-10 15:58:45 +0000
commit7d021397f5697e1f3de91a8f092a75c8428e0cc4 (patch)
tree136ec01dea9c38e97d48c1955dfcd0fc3e9b5935
parent6e39f8601a5e1eaccbe9f0e050250603ef5826b5 (diff)
downloadgcc-7d021397f5697e1f3de91a8f092a75c8428e0cc4.zip
gcc-7d021397f5697e1f3de91a8f092a75c8428e0cc4.tar.gz
gcc-7d021397f5697e1f3de91a8f092a75c8428e0cc4.tar.bz2
* pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
From-SVN: r66665
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/pt.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 81645ce..77cfaac 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+ * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
+
+2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
PR c++/9252
* cp-tree.h (saved_scope): Remove check_access field.
(tsubst_flags_t): Remove tf_parsing.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 972bdab..b4a9729 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -10809,6 +10809,10 @@ instantiate_decl (d, defer_ok)
timevar_push (TV_PARSE);
+ /* We may be in the middle of deferred access check. Disable
+ it now. */
+ push_deferring_access_checks (dk_no_deferred);
+
/* Set TD to the template whose DECL_TEMPLATE_RESULT is the pattern
for the instantiation. */
td = template_for_substitution (d);
@@ -11050,6 +11054,7 @@ instantiate_decl (d, defer_ok)
out:
input_location = saved_loc;
+ pop_deferring_access_checks ();
pop_tinst_level ();
timevar_pop (TV_PARSE);