diff options
| author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-08 23:15:30 +0000 |
|---|---|---|
| committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-12-08 23:15:30 +0000 |
| commit | f9a802b1ca6729d3d2279b7b87f8903c37bce4fd (patch) | |
| tree | 8695b2300a9ac19f099cd8b376cdf41864b90b9e /gcc/cp/init.c | |
| parent | 0f1278bde18cf23bb1c93af9b66ae79ce6d1b27a (diff) | |
| download | ppe42-gcc-f9a802b1ca6729d3d2279b7b87f8903c37bce4fd.tar.gz ppe42-gcc-f9a802b1ca6729d3d2279b7b87f8903c37bce4fd.zip | |
* name-lookup.c, init.c, except.c: Revert Giovanni's patch from
yesterday.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74446 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
| -rw-r--r-- | gcc/cp/init.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 19642d6a29c..21b0032d16f 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2005,18 +2005,11 @@ build_new_1 (tree exp) tree class_size = size_in_bytes (true_type); static const char alloc_name[] = "_Jv_AllocObject"; use_java_new = 1; - if (!get_global_value_if_present (get_identifier (alloc_name), - &alloc_decl)) - {
- error ("call to Java constructor with `%s' undefined", alloc_name); - return error_mark_node; - } - else if (really_overloaded_fn (alloc_decl)) - {
- error ("`%D' should never be overloaded", alloc_decl); - return error_mark_node; - } - alloc_decl = OVL_CURRENT (alloc_decl); + 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); + class_addr = build1 (ADDR_EXPR, jclass_node, class_decl); alloc_call = (build_function_call (alloc_decl, |

