g++ and aliasing bools
Joe Buck
jbuck@synopsys.COM
Fri Jan 25 20:22:00 GMT 2002
> I bootstrapped this version on sparc-sun-solaris2.8:
>
> {
> if (AGGREGATE_TYPE_P (t) &&
> !((TREE_CODE (t) == RECORD_TYPE)
> && !CLASSTYPE_NON_POD_P(t)
> && !CLASSTYPE_N_BASECLASSES(t)))
> return 0;
> }
CLASSNAME_NON_POD_P returns false if there are any methods or if there
is a constructor or destructor, right? If so, then I think we're going
to get little gain: much of the payoff from better aliasing in C++ will
come if we don't get false aliasing complaints for things like STL
iterators. At least in my code, I don't have many NON_PODs; even if
it's a plain struct otherwise, I use a constructor to initialize it.
On the other hand, some of the STL iterators are derived classes. Sigh.
More information about the Gcc
mailing list