This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++ and aliasing bools

> It can still be mapped to C struct, given appropriate types for the
> vptr fields, right?  So Joe's point still holds.  We may have to be
> careful about how we assign aliases to these hidden fields, but it's
> not like they are not representable in C :-)

Yes, probably.

I'm nervous about assigning alias sets to class with virtual bases
because the layout changes when that class is derived from.  So, when
you say "*p" where "p" points to some class with virtual bases, you
have to make sure to be conservative; we have to figure out what all
*p might involve.  I guess that if we just recursively include
everything in all the virtual bases we are probably OK.  Sometimes,
that stuff won't be there, but that's OK; that will only yield false
positives, which are safe.

So, I'm gradually coming to the conclusion that some smarter version
of record_component_aliases should work; it just needs to be very
careful to go through everything that that appears in all the bases
and members.

Mark Mitchell      
CodeSourcery, LLC  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]