diff options
author | Alexandre Petit-Bianco <apbianco@cygnus.com> | 1999-02-16 10:26:57 +0000 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 1999-02-16 02:26:57 -0800 |
commit | e3884b71825937aa8f9dcf7ae75f1ff78748984c (patch) | |
tree | ac2a6e215bf9538c8dbe7a7ce4373b20dffaea45 /gcc/java/parse.y | |
parent | d462a870b73d19c262574cb3ae2c7a72b5b93ecf (diff) | |
download | gcc-e3884b71825937aa8f9dcf7ae75f1ff78748984c.zip gcc-e3884b71825937aa8f9dcf7ae75f1ff78748984c.tar.gz gcc-e3884b71825937aa8f9dcf7ae75f1ff78748984c.tar.bz2 |
parse.y (valid_builtin_assignconv_identity_widening_p): Got rid of an ancient workaround.
Thu Feb 11 21:25:51 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
of an ancient workaround.
From-SVN: r25238
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 2a4702d..3a21252 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -7051,13 +7051,9 @@ lookup_method_invoke (lc, cl, class, name, arg_list) /* Fix the arguments */ for (node = arg_list; node; node = TREE_CHAIN (node)) { - tree current_arg = TREE_VALUE (node); - /* Integer constant 0 passed as itself, not as a type */ - if (current_arg != integer_zero_node) - current_arg = TREE_TYPE (TREE_VALUE (node)); + tree current_arg = TREE_TYPE (TREE_VALUE (node)); /* Non primitive type may have to be resolved */ - if (current_arg != integer_zero_node - && !JPRIMITIVE_TYPE_P (current_arg)) + if (!JPRIMITIVE_TYPE_P (current_arg)) resolve_and_layout (current_arg, NULL_TREE); /* And promoted */ if (TREE_CODE (current_arg) == RECORD_TYPE) @@ -7097,9 +7093,6 @@ lookup_method_invoke (lc, cl, class, name, arg_list) candidates = obstack_finish (&temporary_obstack); } /* Issue the error message */ - for (node = atl; node; node = TREE_CHAIN (node)) - if (TREE_VALUE (node) == integer_zero_node) - TREE_VALUE (node) = long_type_node; method = make_node (FUNCTION_TYPE); TYPE_ARG_TYPES (method) = atl; signature = build_java_argument_signature (method); @@ -8602,11 +8595,6 @@ valid_builtin_assignconv_identity_widening_p (lhs_type, rhs_type) if (lhs_type == rhs_type) return 1; - /* Sometimes, instead of passing a type, we pass integer_zero_node - so we know that a numeric type can accomodate it */ - if (JNUMERIC_TYPE_P (lhs_type) && (rhs_type == integer_zero_node)) - return 1; - /* Reject non primitive types */ if (!JPRIMITIVE_TYPE_P (lhs_type) || !JPRIMITIVE_TYPE_P (rhs_type)) return 0; @@ -8793,8 +8781,7 @@ static int valid_method_invocation_conversion_p (dest, source) tree dest, source; { - return (((JPRIMITIVE_TYPE_P (source) || (source == integer_zero_node)) - && JPRIMITIVE_TYPE_P (dest) + return ((JPRIMITIVE_TYPE_P (source) && JPRIMITIVE_TYPE_P (dest) && valid_builtin_assignconv_identity_widening_p (dest, source)) || ((JREFERENCE_TYPE_P (source) || JNULLP_TYPE_P (source)) && (JREFERENCE_TYPE_P (dest) || JNULLP_TYPE_P (dest)) |