+2003-01-04 Mark Mitchell <mark@codesourcery.com>
+
+ * method.c (use_thunk): Disable access control while building the
+ body of the thunk.
+
2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
* cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
doesn't work for varargs. */
tree a, t;
+ int saved_check_access;
if (varargs_function_p (function))
error ("generic thunk code fails for method `%#D' which uses `...'",
start_function (NULL_TREE, thunk_fndecl, NULL_TREE, SF_PRE_PARSED);
/* We don't bother with a body block for thunks. */
+ /* There's no need to check accessibility inside the thunk body. */
+ saved_check_access = scope_chain->check_access;
+ scope_chain->check_access = 0;
+
t = a;
-
if (this_adjusting)
t = thunk_adjust (t, /*this_adjusting=*/1,
fixed_offset, virtual_offset);
/* But we don't want debugging information about it. */
DECL_IGNORED_P (thunk_fndecl) = 1;
+ /* Re-enable access control. */
+ scope_chain->check_access = saved_check_access;
+
expand_body (finish_function (0));
}