aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>1999-07-07 13:11:03 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>1999-07-07 06:11:03 -0700
commit1a6d4fb73c25078994d945918a1451a94f79e56c (patch)
tree5b9696999f573cbe70d7dd465a7618959da1fc81 /gcc/java/parse.y
parent44a6ce434cdb606a3a8d9e542351aefbf1eb8965 (diff)
downloadgcc-1a6d4fb73c25078994d945918a1451a94f79e56c.zip
gcc-1a6d4fb73c25078994d945918a1451a94f79e56c.tar.gz
gcc-1a6d4fb73c25078994d945918a1451a94f79e56c.tar.bz2
[multiple changes]
Sat Jul 3 22:26:32 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed CALL_EXPR, to avoid order of evaluation changes. Fri Jul 2 17:44:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (qualify_ambiguous_name): Do not use IDENTIFIER_LOCAL_VALUE when name is a STRING_CST. Thu Jul 1 23:31:16 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * check-init.c (check_init): Handle MAX_EXPR. * expr.c (force_evaluation_order): Force method call arguments to be evaluated in left-to-right order. * parse.y (qualify_ambiguous_name): Loop again to qualify NEW_ARRAY_EXPR properly. Wed Jun 30 17:27:58 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (patch_invoke): Resolve unresolved invoked method returned type. (qualify_ambiguous_name): STRING_CST to qualify expression for type name resolution. From-SVN: r27998
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y18
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 8abd4a7..4a4b324 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -7228,6 +7228,11 @@ patch_invoke (patch, method, args)
if (JPRIMITIVE_TYPE_P (TREE_TYPE (TREE_VALUE (ta))) &&
TREE_TYPE (TREE_VALUE (ta)) != TREE_VALUE (t))
TREE_VALUE (ta) = convert (TREE_VALUE (t), TREE_VALUE (ta));
+
+ /* Resolve unresolved returned type isses */
+ t = TREE_TYPE (TREE_TYPE (method));
+ if (TREE_CODE (t) == POINTER_TYPE && !CLASS_LOADED_P (TREE_TYPE (t)))
+ resolve_and_layout (TREE_TYPE (t), NULL);
if (flag_emit_class_files || flag_emit_xref)
func = method;
@@ -7638,7 +7643,7 @@ qualify_ambiguous_name (id)
break;
case NEW_ARRAY_EXPR:
qual = TREE_CHAIN (qual);
- new_array_found = 1;
+ again = new_array_found = 1;
continue;
case NEW_CLASS_EXPR:
case CONVERT_EXPR:
@@ -7716,7 +7721,8 @@ qualify_ambiguous_name (id)
declaration or parameter declaration, then it is an expression
name. We don't carry this test out if we're in the context of the
use of SUPER or THIS */
- if (!this_found && !super_found && (decl = IDENTIFIER_LOCAL_VALUE (name)))
+ if (!this_found && !super_found &&
+ TREE_CODE (name) != STRING_CST && (decl = IDENTIFIER_LOCAL_VALUE (name)))
{
RESOLVE_EXPRESSION_NAME_P (qual_wfl) = 1;
QUAL_RESOLUTION (qual) = decl;
@@ -7733,15 +7739,17 @@ qualify_ambiguous_name (id)
QUAL_RESOLUTION (qual) = (new_array_found ? NULL_TREE : decl);
}
- /* We reclassify NAME as a type name if:
+ /* We reclassify NAME as yielding to a type name resolution if:
- NAME is a class/interface declared within the compilation
unit containing NAME,
- NAME is imported via a single-type-import declaration,
- NAME is declared in an another compilation unit of the package
of the compilation unit containing NAME,
- NAME is declared by exactly on type-import-on-demand declaration
- of the compilation unit containing NAME. */
- else if ((decl = resolve_and_layout (name, NULL_TREE)))
+ of the compilation unit containing NAME.
+ - NAME is actually a STRING_CST. */
+ else if (TREE_CODE (name) == STRING_CST ||
+ (decl = resolve_and_layout (name, NULL_TREE)))
{
RESOLVE_TYPE_NAME_P (qual_wfl) = 1;
QUAL_RESOLUTION (qual) = decl;