[libc-commits] [PATCH] D119145: [libc] Fix illegal type punning

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Feb 7 08:29:03 PST 2022


lntue added inline comments.


================
Comment at: libc/src/__support/CPP/Bit.h:35
+  char *dst = reinterpret_cast<char *>(&to);
+  const char* src=reinterpret_cast<const char *>(&from));
+#if defined(LLVM_LIBC_HAS_BUILTIN_MEMCPY_INLINE)
----------------
Extra space around `=`, and extra closing parenthesis to be removed.


================
Comment at: libc/src/__support/CPP/Bit.h:37-39
+  __builtin_memcpy_inline(dst, src, SIZE);
+#else
+  for (unsigned i = 0; i < SIZE; ++i)
----------------
Is SIZE defined anywhere?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119145/new/

https://reviews.llvm.org/D119145



More information about the libc-commits mailing list