This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ and aliasing bools
- From: Dan Nicolaescu <dann at godzilla dot ICS dot UCI dot EDU>
- To: Daniel Berlin <dan at dberlin dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 23 Jan 2002 17:56:20 -0800
- Subject: Re: g++ and aliasing bools
- References: <Pine.LNX.4.44.0201232018510.20726-100000@dberlin.org>
Daniel Berlin <dan@dberlin.org> writes:
> On Wed, 23 Jan 2002, Dan Nicolaescu
> wrote:
>
> >
> > It looks like g++ has some problems with aliasing bools, and gcc
> > doesn't.
>
> It's a side effect of C++ not making alias sets for classes, i think.
> Try commenting out the AGGREGATE_TYPE_P check in cxx_get_alias_set and see
> if it goes away.
Yep, it went away.
There's a comment in that function:
/* It's not yet safe to use alias sets for classes in C++ because
the TYPE_FIELDs list for a class doesn't mention base classes. */
Can the AGGREGATE_TYPE_P check be relaxed for classes that don't have
a base class?