On Tuesday, August 16, 2011 11:00:39 PM UTC+1, Amahdy wrote: > > Maybe you are correct here, > > It's not maybe: Paul Smith is correct here. According to the standard [1], *any* behaviour of that program is OK, including formatting your hard drive, punching you in the face, and nasal demons.
Just don't write programs like that. [1] from C++0x: "If a side effect on a scalar object is unsequenced relative to either anotherside effect on the same scalar object or a value computation using the value of the same scalar object, the behavior is undefined" also "Permissible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message)." -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-code/-/T2Yw4isp1YAJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
