[TUHS] Unix stories

Random832 random832 at fastmail.com
Thu Jan 5 01:59:03 AEST 2017


On Wed, Jan 4, 2017, at 09:54, Ron Natalie wrote:
> > I assume you're imagining it as being equivalent to i = j + i + 1, with a redundant store operation.
> 
> It's what the language standard specifies, not imagination.  C and C++
> state that modifying twice between sequence points or using the value
> other than to compute the value for a store is undefined behavior.
> The languages put no constraint on what may happen when you do this.

But I'm talking about the alternate universe in which the person I was
replying to is justified in thinking that it's clear what he means, vs a
'plausible' implementation that could arise from methods of translating
expressions into machine operations (since people don't tend to respond
to "it's undefined because it is, and the compiler can arbitrarily mess
things up because it's allowed to by the fact that it's undefined"
without a plausible theory of why something might ever behave in a way
other than the obvious way)



More information about the TUHS mailing list