[C++ PATCH, committed] Fix libstdc++ regressions due to my access checking changes

Kriang Lerdsuwanakij lerdsuwa@users.sourceforge.net
Sun May 11 16:15:00 GMT 2003


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 &



More information about the Gcc-patches mailing list