diff options
author | Bryce McKinlay <mckinlay@redhat.com> | 2004-07-10 15:53:40 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2004-07-10 16:53:40 +0100 |
commit | 9ee226ef126a9d09cf73043a843be0f61e871c9a (patch) | |
tree | 2f443704912367705c2f6e6b8fb9efcd05466a3b | |
parent | a4548f27d0d792321af470e4aa4f64af4df30c0f (diff) | |
download | gcc-9ee226ef126a9d09cf73043a843be0f61e871c9a.zip gcc-9ee226ef126a9d09cf73043a843be0f61e871c9a.tar.gz gcc-9ee226ef126a9d09cf73043a843be0f61e871c9a.tar.bz2 |
004-07-10 Bryce McKinlay <mckinlay@redhat.com>
* class.c (common_enclosing_context_p): Remove statement with no
side-effects.
From-SVN: r84460
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/class.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index fea2c21..6934f07 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2004-07-10 Bryce McKinlay <mckinlay@redhat.com> + + * class.c (common_enclosing_context_p): Remove statement with no + side-effects. + 2004-07-09 Bryce McKinlay <mckinlay@redhat.com> PR java/8618 diff --git a/gcc/java/class.c b/gcc/java/class.c index 1273b62..abadbd1 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -594,9 +594,7 @@ enclosing_context_p (tree type1, tree type2) int common_enclosing_context_p (tree type1, tree type2) { - for (type1; type1; - type1 = (INNER_CLASS_TYPE_P (type1) ? - TREE_TYPE (DECL_CONTEXT (TYPE_NAME (type1))) : NULL_TREE)) + while (type1) { tree current; for (current = type2; current; @@ -605,6 +603,11 @@ common_enclosing_context_p (tree type1, tree type2) NULL_TREE)) if (type1 == current) return 1; + + if (INNER_CLASS_TYPE_P (type1)) + type1 = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (type1))); + else + break; } return 0; } |