On 17 Apr 2007 13:13:15 -0700, Mohammad Nabil <[EMAIL PROTECTED]> wrote:
> I think that's not undefined behavior the compiler translates as follows:

You're wrong.

Any code of the form:

i = ++i;

or

x = y + y++;

where a variable is modified more than once in 'a statement' (formally
'between sequence points') produces undefined behaviour. Just because
you feel can justify one compiler's behaviour, doesn't mean that you
can predict why other compilers may produce results. Undefined
behaviour includes behaviour that may seem 'reasonable.'

The C (and C++) Standards (the ultimate reference on what compilers
can, may, and must do) define these operations as undefined behaviours
for a reason.

You can argue all you want, but unless your arguement substantiates
undefined behaviour, you'll be told you're 'wrong.'


-- 
PJH
Aio, quantitas magna frumentorum est

Reply via email to