Created on 2015-11-06.00:00:00 last changed 81 months ago
Additional notes from the November, 2016 meeting:
See also national body comment CH2, addressed in March, 2017 by P0612R0.
Consider:
struct A { ~A(); double d; float f; }; struct B : A { volatile int i; }; A foo(B *bp) { return *static_cast<A *>(bp); }
Is it okay for the memory associated with bp->i to be accessed by foo?
See also 9.2.9.2 [dcl.type.cv] paragraph 5
The semantics of an access through a volatile glvalue are implementation-defined. If an attempt is made to access an object defined with a volatile-qualified type through the use of a non-volatile glvalue, the behavior is undefined.
History | |||
---|---|---|---|
Date | User | Action | Args |
2018-02-27 00:00:00 | admin | set | messages: + msg5936 |
2015-11-06 00:00:00 | admin | create |