diff options
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 642e15d..a6cdfb5 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -145,11 +145,8 @@ push_deferring_access_checks (deferring_kind deferring) deferred_access_no_check++; else { - deferred_access *ptr; - - ptr = VEC_safe_push (deferred_access, gc, deferred_access_stack, NULL); - ptr->deferred_access_checks = NULL; - ptr->deferring_access_checks_kind = deferring; + deferred_access e = {NULL, deferring}; + VEC_safe_push (deferred_access, gc, deferred_access_stack, e); } } @@ -243,7 +240,7 @@ pop_to_parent_deferring_access_checks (void) } /* Insert into parent's checks. */ VEC_safe_push (deferred_access_check, gc, - ptr->deferred_access_checks, chk); + ptr->deferred_access_checks, *chk); found:; } } @@ -311,7 +308,6 @@ perform_or_defer_access_check (tree binfo, tree decl, tree diag_decl, int i; deferred_access *ptr; deferred_access_check *chk; - deferred_access_check *new_access; /* Exit if we are in a context that no access checking is performed. @@ -341,13 +337,9 @@ perform_or_defer_access_check (tree binfo, tree decl, tree diag_decl, } } /* If not, record the check. */ - new_access = - VEC_safe_push (deferred_access_check, gc, - ptr->deferred_access_checks, 0); - new_access->binfo = binfo; - new_access->decl = decl; - new_access->diag_decl = diag_decl; - new_access->loc = input_location; + deferred_access_check new_access = {binfo, decl, diag_decl, input_location}; + VEC_safe_push (deferred_access_check, gc, ptr->deferred_access_checks, + new_access); return true; } |