Re: Increment/decrement operator bugs

2008-09-25 Thread Eric Botcazou
> The result of an expression using pre-decrement or pre-increment such as: > y = x * n * --n; > gives different results in a few cases where x is placed before or after > the rest, or when its value is 1 or not. Please run the program attached > where a comment indicates what we think wor

Re: Increment/decrement operator bugs

2008-09-25 Thread Andrew Thomas Pinski
Sent from my iPhone On Sep 25, 2008, at 10:39 AM, "Miguel A. Quintans" <[EMAIL PROTECTED] > wrote: Hello The result of an expression using pre-decrement or pre-increment such as: y = x * n * --n; Try turning on warnings. That is -Wsquence-points. The above is specified behavi

Increment/decrement operator bugs

2008-09-25 Thread Miguel A. Quintans
Hello The result of an expression using pre-decrement or pre-increment such as: y = x * n * --n; gives different results in a few cases where x is placed before or after the rest, or when its value is 1 or not. Please run the program attached where a comment indicates what we think work