[compiler-rt] [compiler-rt][builtins] Switch to using __builtin_memcpy_inline (PR #69784)

A. Jiang via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 23:07:10 PDT 2023


frederick-vs-ja wrote:

> __builtin_bit_cast seems to be available only in C++ (https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html), not in C

Oh, I'm sorry for the wrong suggestion. It seems that only clang supports `__builtin_bit_cast` in C ([demo](https://godbolt.org/z/cMMYehYb1)).

Do these builtins even need to be compiled in C++? I think the existing approach is UB in C++ but not in C.

https://github.com/llvm/llvm-project/pull/69784


More information about the llvm-commits mailing list