??? 06/24/07 18:56 Read: times |
#141194 - Worse than "implementation dependent" Responding to: ???'s previous message |
Jeff Post said:
The compiler will, or should, generate a warning message that the result is undefined, though most will evaluate the operations in the order you'd expect.
Some things in C are defined as "implementation dependent" and can bite you if you're not aware of them. But not in this case is it "implementation dependent". The standard puts it in the worse category of "undefined behavior". Associativity is one thing, but there's a "sequence point" issue here too. |