This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH, committed] Fix libstdc++ regressions due to my accesschecking changes
- From: Kriang Lerdsuwanakij <lerdsuwa at users dot sourceforge dot net>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 11 May 2003 23:22:17 +0700 (ICT)
- Subject: [C++ PATCH, committed] Fix libstdc++ regressions due to my accesschecking changes
- Reply-to: <lerdsuwa at users dot sourceforge dot net>
Hi
The access checking work I installed earlier still missed one function
'synthesize_method'. I overlooked this particular case, focusing on
only template instantiation codes. We need to get out of deferring
check when we are synthesizing ctors/dtors as well. I installed this
on the main trunk to fix a couple libstdc++ testsuite regressions
due to my earlier patches.
--Kriang
2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
* method.c (synthesize_method): Call push/pop_deferring_access_checks.
diff -cp gcc-main-save/gcc/cp/method.c gcc-main-new/gcc/cp/method.c
*** gcc-main-save/gcc/cp/method.c Sat May 10 18:16:21 2003
--- gcc-main-new/gcc/cp/method.c Sun May 11 21:24:38 2003
*************** synthesize_method (tree fndecl)
*** 741,746 ****
--- 741,750 ----
return;
}
+ /* We may be in the middle of deferred access check. Disable
+ it now. */
+ push_deferring_access_checks (dk_no_deferred);
+
if (! context)
push_to_top_level ();
else if (nested)
*************** synthesize_method (tree fndecl)
*** 790,795 ****
--- 794,801 ----
pop_from_top_level ();
else if (nested)
pop_function_context_from (context);
+
+ pop_deferring_access_checks ();
}
/* Use EXTRACTOR to locate the relevant function called for each base &