diff options
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r-- | gcc/java/jcf-parse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 9ce5561..eef75aa 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -936,13 +936,14 @@ handle_signature_attribute (int member_index, JCF *jcf, #define HANDLE_EXCEPTIONS_ATTRIBUTE(COUNT) \ { \ int n = COUNT; \ - tree list = DECL_FUNCTION_THROWS (current_method); \ + VEC (tree,gc) *v = VEC_alloc (tree, gc, n); \ + gcc_assert (DECL_FUNCTION_THROWS (current_method) == NULL); \ while (--n >= 0) \ { \ tree thrown_class = get_class_constant (jcf, JCF_readu2 (jcf)); \ - list = tree_cons (NULL_TREE, thrown_class, list); \ + VEC_quick_push (tree, v, thrown_class); \ } \ - DECL_FUNCTION_THROWS (current_method) = nreverse (list); \ + DECL_FUNCTION_THROWS (current_method) = v; \ } #define HANDLE_DEPRECATED_ATTRIBUTE() handle_deprecated () |