From 6b48deee6ece109f4f4e4e2659f038472b9220c8 Mon Sep 17 00:00:00 2001 From: Alexandre Petit-Bianco Date: Sat, 20 May 2000 22:38:05 +0000 Subject: [PATCH] parse.y (resolve_package): Correctly set `*next' (was off by one.) 2000-05-01 Alexandre Petit-Bianco * parse.y (resolve_package): Correctly set `*next' (was off by one.) (resolve_qualified_expression_name): Fixed comment. From-SVN: r34060 --- gcc/java/ChangeLog | 6 ++++++ gcc/java/parse.c | 7 +++++-- gcc/java/parse.y | 7 +++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index b4a1dacde46..663e6216889 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2000-05-01 Alexandre Petit-Bianco + + * parse.y (resolve_package): Correctly set `*next' (was off by + one.) + (resolve_qualified_expression_name): Fixed comment. + Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco * parse.y (block_end:): If the collected block doesn't feature a diff --git a/gcc/java/parse.c b/gcc/java/parse.c index e4d044ba07b..1b58acdee14 100644 --- a/gcc/java/parse.c +++ b/gcc/java/parse.c @@ -9311,7 +9311,10 @@ resolve_package (pkg, next) if ((type_name = resolve_no_layout (acc, NULL_TREE))) { type_name = acc; - *next = TREE_CHAIN (current); + /* resolve_package should be used in a loop, hence we + point at this one to naturally process the next one at + the next iteration. */ + *next = current; break; } } @@ -11525,7 +11528,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) { tree list; *where_found = decl = resolve_no_layout (name, qual_wfl); - /* We wan't to be absolutely that the class is laid + /* We want to be absolutely sure that the class is laid out. We're going to search something inside it. */ *type_found = type = TREE_TYPE (decl); layout_class (type); diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 32b3756a00f..ca99a072bae 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -6679,7 +6679,10 @@ resolve_package (pkg, next) if ((type_name = resolve_no_layout (acc, NULL_TREE))) { type_name = acc; - *next = TREE_CHAIN (current); + /* resolve_package should be used in a loop, hence we + point at this one to naturally process the next one at + the next iteration. */ + *next = current; break; } } @@ -8893,7 +8896,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) { tree list; *where_found = decl = resolve_no_layout (name, qual_wfl); - /* We wan't to be absolutely that the class is laid + /* We want to be absolutely sure that the class is laid out. We're going to search something inside it. */ *type_found = type = TREE_TYPE (decl); layout_class (type); -- 2.30.2