Commit 9ee226ef by Bryce McKinlay Committed by Bryce McKinlay

004-07-10 Bryce McKinlay <mckinlay@redhat.com>

        * class.c (common_enclosing_context_p): Remove statement with no
        side-effects.

From-SVN: r84460
parent a4548f27
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> 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
PR java/8618 PR java/8618
......
...@@ -594,9 +594,7 @@ enclosing_context_p (tree type1, tree type2) ...@@ -594,9 +594,7 @@ enclosing_context_p (tree type1, tree type2)
int int
common_enclosing_context_p (tree type1, tree type2) common_enclosing_context_p (tree type1, tree type2)
{ {
for (type1; type1; while (type1)
type1 = (INNER_CLASS_TYPE_P (type1) ?
TREE_TYPE (DECL_CONTEXT (TYPE_NAME (type1))) : NULL_TREE))
{ {
tree current; tree current;
for (current = type2; current; for (current = type2; current;
...@@ -605,6 +603,11 @@ common_enclosing_context_p (tree type1, tree type2) ...@@ -605,6 +603,11 @@ common_enclosing_context_p (tree type1, tree type2)
NULL_TREE)) NULL_TREE))
if (type1 == current) if (type1 == current)
return 1; return 1;
if (INNER_CLASS_TYPE_P (type1))
type1 = TREE_TYPE (DECL_CONTEXT (TYPE_NAME (type1)));
else
break;
} }
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment