* pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Sat, 10 May 2003 15:58:45 +0000 (15:58 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Sat, 10 May 2003 15:58:45 +0000 (15:58 +0000)
From-SVN: r66665

gcc/cp/ChangeLog
gcc/cp/pt.c

index 81645ceeddb045a36a9bef7738f6b258d63dd138..77cfaacd346a72bb5892f5f9716e3ab1dbc9f8cf 100644 (file)
@@ -1,3 +1,7 @@
+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
index 972bdab265a40de8644d8311c5d152d68e5e63c0..b4a9729da0b9f2b0b37531ba007df3804feee7fa 100644 (file)
@@ -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);