llvm-project/utils/bazel/llvm-project-overlay/libc
Guillaume Chatelet 7e7ecef980 [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
2022-02-08 20:45:59 +00:00
..
BUILD.bazel [libc] Replace type punning with bit_cast 2022-02-08 20:45:59 +00:00
libc_build_rules.bzl
platforms.bzl