Hotspot currently has many places using C style casts, static_cast, or reinterpret_cast to convert between representations without changing the underlying bit representation.
C++20 introduced std::bit_cast for this purpose and it is well defined. It is actually possible to implement bit_cast for C++14, without some constexpr support.
This feature request is to refactor PrimitiveConversions::cast to bit_cast, expand bit_cast to support all compatible types, and use __builtin_bit_cast where available while falling back to the original implementations in PrimitiveConversions::cast. It then will replace some legacy conversion techniques with bit_cast.