summaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index ad49211b58b..cbb0235937b 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -824,7 +824,7 @@ build_throw (tree exp)
if (CLASS_TYPE_P (temp_type))
{
int flags = LOOKUP_NORMAL | LOOKUP_ONLYCONVERTING;
- VEC(tree,gc) *exp_vec;
+ vec<tree, va_gc> *exp_vec;
/* Under C++0x [12.8/16 class.copy], a thrown lvalue is sometimes
treated as an rvalue for the purposes of overload resolution
@@ -1176,9 +1176,7 @@ typedef struct GTY(()) pending_noexcept {
tree fn;
location_t loc;
} pending_noexcept;
-DEF_VEC_O(pending_noexcept);
-DEF_VEC_ALLOC_O(pending_noexcept,gc);
-static GTY(()) VEC(pending_noexcept,gc) *pending_noexcept_checks;
+static GTY(()) vec<pending_noexcept, va_gc> *pending_noexcept_checks;
/* FN is a FUNCTION_DECL that caused a noexcept-expr to be false. Warn if
it can't throw. */
@@ -1204,7 +1202,7 @@ perform_deferred_noexcept_checks (void)
int i;
pending_noexcept *p;
location_t saved_loc = input_location;
- FOR_EACH_VEC_ELT (pending_noexcept, pending_noexcept_checks, i, p)
+ FOR_EACH_VEC_SAFE_ELT (pending_noexcept_checks, i, p)
{
input_location = p->loc;
maybe_noexcept_warning (p->fn);
@@ -1248,7 +1246,7 @@ expr_noexcept_p (tree expr, tsubst_flags_t complain)
{
/* Not defined yet; check again at EOF. */
pending_noexcept p = {fn, input_location};
- VEC_safe_push (pending_noexcept, gc, pending_noexcept_checks, p);
+ vec_safe_push (pending_noexcept_checks, p);
}
else
maybe_noexcept_warning (fn);