[libc] Replace type punning with bit_cast
Although type punning is defined for union in C, it is UB in C++. This patch introduces a bit_cast function to convert between types in a safe way. This is necessary to get llvm-libc compile with GCC. This patch is extracted from D119002. Differential Revision: https://reviews.llvm.org/D119145
Loading
Please register or sign in to comment