summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-17 05:30:37 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-17 05:30:37 +0000
commit51d619308377f16a8ff13df95becfe2282198844 (patch)
tree21b147aea83b41c5c37fba84ea32c18f1c7de253 /gcc/java
parent9b39d7e80300d4a7fc3399d0896881027479b72a (diff)
downloadgcc-51d619308377f16a8ff13df95becfe2282198844.tar.gz
2012-09-17 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 191371 using svnmerge. [gcc/] 2012-09-17 Basile Starynkevitch <basile@starynkevitch.net> {{when merging trunk svn rev 191371}} * melt-runtime.c (melt_load_module_index): Push an empty slot, not a null pointer, into melt_modinfvec. (meltgc_run_c_extension): Push an empty slot, not a null pointer, into melt_extinfvec. (melt_really_initialize): Better indentation, and increase maximal minore size to 32768Kwords. Push an empty slot, not a null pointer, into melt_modinfvec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@191373 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/class.c7
-rw-r--r--gcc/java/expr.c5
2 files changed, 6 insertions, 6 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index f806cea1414..a89b83183b6 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -2198,9 +2198,10 @@ make_class_data (tree type)
for (i = 0; i < count; i++)
{
- constructor_elt *elt = VEC_quick_push (constructor_elt, v, NULL);
- elt->index = build_int_cst (sizetype, i);
- elt->value = build_int_cstu (byte_type_node, data[i]);
+ constructor_elt elt;
+ elt.index = build_int_cst (sizetype, i);
+ elt.value = build_int_cstu (byte_type_node, data[i]);
+ VEC_quick_push (constructor_elt, v, elt);
}
DECL_INITIAL (array) = build_constructor (type, v);
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 0429c02ca34..8041cdd99c4 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -2296,14 +2296,13 @@ get_symbol_table_index (tree t, tree special,
{
method_entry *e;
unsigned i;
+ method_entry elem = {t, special};
FOR_EACH_VEC_ELT (method_entry, *symbol_table, i, e)
if (t == e->method && special == e->special)
goto done;
- e = VEC_safe_push (method_entry, gc, *symbol_table, NULL);
- e->method = t;
- e->special = special;
+ VEC_safe_push (method_entry, gc, *symbol_table, elem);
done:
return i + 1;