+2003-12-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>\r
+\r
+ * init.c (build_new_1): Deal with an OVERLOAD set when\r
+ looking up for _Jv_AllocObject.\r
+ * except.c (build_throw): Likewise for _Jv_Throw.\r
+
2003-12-08 Jason Merrill <jason@redhat.com>
PR c++/11971
tmp = build_function_type (ptr_type_node, tmp);
fn = push_throw_library_fn (fn, tmp);
}
+ else if (really_overloaded_fn (fn))
+ {\r
+ error ("`%D' should never be overloaded", fn);
+ return error_mark_node;\r
+ }
fn = OVL_CURRENT (fn);
exp = build_function_call (fn, tree_cons (NULL_TREE, exp, NULL_TREE));
}
tree class_size = size_in_bytes (true_type);
static const char alloc_name[] = "_Jv_AllocObject";
use_java_new = 1;
- alloc_decl = IDENTIFIER_GLOBAL_VALUE (get_identifier (alloc_name));
- if (alloc_decl == NULL_TREE)
- fatal_error ("call to Java constructor with `%s' undefined",
- alloc_name);
-
+ if (!get_global_value_if_present (get_identifier (alloc_name),
+ &alloc_decl))
+ {\r
+ error ("call to Java constructor with `%s' undefined", alloc_name);
+ return error_mark_node;
+ }
+ else if (really_overloaded_fn (alloc_decl))
+ {\r
+ error ("`%D' should never be overloaded", alloc_decl);
+ return error_mark_node;
+ }
+ alloc_decl = OVL_CURRENT (alloc_decl);
class_addr = build1 (ADDR_EXPR, jclass_node, class_decl);
alloc_call = (build_function_call
(alloc_decl,