static_cast of a pointer to object before the start of the object's
lifetime has undefined behavior (c++14 p3.8)
This code triggers CFI warnings.
This also could be fixed in a different way by replacing C-style
casts with reinterpret_cast<>, which, from my reading of the
standard, is allowed in this context. That would not help with CFI
though, which still flags such casts as invalid (yes, it is stricter
that the standard).