vendredi 28 août 2020

reinterpret_cast - the same pointer may have multiple integer representations [duplicate]

https://en.cppreference.com/w/cpp/language/reinterpret_cast

A pointer converted to an integer of sufficient size and back to the same pointer type is guaranteed to have its original value, otherwise the resulting pointer cannot be dereferenced safely (the round-trip conversion in the opposite direction is not guaranteed; the same pointer may have multiple integer representations)

What does the statement in bold mean?

Aucun commentaire:

Enregistrer un commentaire