g++ and aliasing bools

Paolo Carlini pcarlini@unitus.it
Fri Jan 25 17:37:00 GMT 2002


Joe Buck wrote:

> The argument can be extended to handle non-virtual single or multiple
> inheritance: from the C point of view,
>
> struct D : public A, public B {
>         int m;
> };
>
> can be thought of as
>
> struct D {
>         struct A __base1;
>         struct B __base2;
>         int m;
> };
>
> and analyzed in the same way, meaning that D's alias set contains A, B,
> and m.  But implementation-wise, that would mean that c_get_alias_set
> would have to be told to treat base classes as members.

Great! Joe, *please* work on formalizing this: it would catch so *many* cases
present in real code!!

Cheers,
Paolo.




More information about the Gcc mailing list