http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57725

--- Comment #9 from jbeulich at novell dot com ---
But that's the point - the compiler takes the liberty to treat "start != end"
as always true, and "start < end" as being replaceable with "start <= end".
Hence a respective for() loop could in the first case become endless, and in
the second case be run through once when the body shouldn't be entered at all.
This is what triggered all this, and I just tried to avoid referring to a
linker script when a C example alone can demonstrate this.

I agree to you saying

> It's intrinsic to using empty objects that it *doesn't matter to your 
> code* when odd things happen about objects at the same address.  If it 
> matters whether addresses derived from different objects compare distinct 
> (including whether it's determinate whether they compare distinct), don't 
> use empty objects.

but you need to carefully distinguish this from the case where the objects just
_may_ be empty, and hence the code relies on being able to detect the
emptiness.

Reply via email to