Strict aliasing rule
I'm reading notes about reinterpret_cast and it's aliasing rules ( http://en.cppreference.com/w/cpp/language/reinterpret_cast ). I wrote that code: struct A { int t; }; char *buf = new char[sizeof(A)]; A *ptr = reinterpret_cast<A*>(buf); ptr->t = 1; A *ptr2 = reinterpret_cast<A*>(buf); cout << ptr2->t; I think these rules doesn't apply here: T2 is the (possibly cv-qualified) dynamic type of the object T2 and T1 are both (possibly multi-level, possibly cv-qualified at each level) pointers to the same type T3 (since C++11) T2 is an aggregate type or a union type which holds one of the