[Patch] PR java/21418: Order of files on command line matters while resolving inheritance
Andrew Haley
aph@redhat.com
Wed Sep 21 10:36:00 GMT 2005
Ranjit Mathew writes:
> On 9/21/05, Andrew Haley <aph@redhat.com> wrote:
> > > + super_class = CLASSTYPE_SUPER (type1);
> > > +
> > > + if (super_class && TREE_CODE (super_class) == POINTER_TYPE)
> >
> > I don't quite understand this test for POINTER_TYPE.
>
> If the super class hasn't yet been laid out, CLASSTYPE_SUPER
> returns a POINTER_TYPE representing the super class instead
> of the proper RECORD_TYPE. Now I don't know whether this is
> a bug or a feature, but this is what I discovered under a debugger
> and if I look at the while loop surrounding this code, only a
> RECORD_TYPE seems kosher.
>
> If you look at the code in maybe_layout_super_class(), when
> faced with a POINTER_TYPE for a class, it tries to resolve
> the class first.
But the code you've added seems to be duplicating some of the logic in
maybe_layout_super_class(). Why not simply call that function?
Andrew.
More information about the Gcc-patches
mailing list