Proposed resolution to aliasing issue.

Mike Stump mrs@apple.com
Thu May 12 21:28:00 GMT 2005


On May 12, 2005, at 4:32 AM, Theodore Papadopoulo wrote:
> Is the compiler allowed to suppress b2 and/or b3 from the layout of  
> the
> object.

Yes, of course, in some cases.  For example when whole program  
analysis tells it, it can.

> The next question comes when b1,b2 and b3 are in various places
> in an inheritance path, would it be allowed to only keep the first
> reference in this path (provided of course that it can be proved that
> all references are bound to the same object).

Yes, of course, same reasoning.

The as-if rule is _very_ flexible.



More information about the Gcc mailing list