This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ and aliasing bools
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Joe Buck <jbuck at synopsys dot COM>, Daniel Berlin <dan at dberlin dot org>, Neil Booth <neil at daikokuya dot demon dot co dot uk>, Paolo Carlini <pcarlini at unitus dot it>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 28 Jan 2002 18:14:01 -0800
- Subject: 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 mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com