Am Mittwoch, 27. September 2006 20:13 schrieb Andre Poenitz:
> On Wed, Sep 27, 2006 at 04:29:19PM +0200, Georg Baum wrote:
> > The only way I can imagine that this works with inset_ == 0 is if the
> > compiler optimizes the address taking operator and the dereferencing
> > operator away and does this instead:
> 
> The compiler does that. In fact, & and * are pretty often translated to
> no-ops.
> 
> >         return p.inset_ == q.inset_
> > ...
> > 
> > Is this allowed by the standard?
> 
> No, this is undefined behaviour.

I suspected that but was too lazy to look it up. Thanks for clarifying.

> > Even if it is, should we not better be
> > explicit and apply the attached patch?
> 
> Yes.

It is in already.


Georg

Reply via email to