Paul Schlie <[EMAIL PROTECTED]> writes:
[...] | > | With all due respect, unless there is an explicit reference in the standard | > | to contradict it's clearly stated requirement that an object's qualified | > | lvalue ("locator value") designates the object being referenced, all | > | interpretations to the contrary are at best presumptuous, regardless of | > | whether or not it's generalized behavior may be indeterminate. | > | | > | (but regardless, at least things are successively approximating "correct") | > | > I don't understand what you mean here. Are you seriously suggesting | > that | > | > int main(void) { | > const int x = 4; | > *(int*)&x = 3; | > } | > | > is well-defined? | | Actually yes, I believe it's well defined that: [#5] If an attempt is made to modify an object defined with a const-qualified type through use of an lvalue with non- const-qualified type, the behavior is undefined. If an attempt is made to refer to an object defined with a volatile-qualified type through use of an lvalue with non- volatile-qualified type, the behavior is undefined.113) -- Gaby