g++ and aliasing bools

Daniel Berlin dan@dberlin.org
Wed Jan 23 19:16:00 GMT 2002


On Wed, 23 Jan 2002, Dan Nicolaescu wrote:

> 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? 
Dunno, but it makes sense to me to do so.
> 
> 



More information about the Gcc mailing list