rsmith updated this revision to Diff 289329. rsmith added a comment. Add missing word.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86993/new/ https://reviews.llvm.org/D86993 Files: clang/docs/Toolchain.rst Index: clang/docs/Toolchain.rst =================================================================== --- clang/docs/Toolchain.rst +++ clang/docs/Toolchain.rst @@ -276,6 +276,19 @@ `C standard library <https://en.cppreference.com/w/c>`_ implementations. +Clang and LLVM make some assumptions about the behavior of the C standard +library beyond those required by the C standard: + +* ``memcpy(p, q, 0)`` and ``memmove(p, q, 0)`` are expected to have no effect, + even if ``p`` or ``q`` is a null or otherwise-invalid (but correctly-aligned) + pointer. +* ``memcpy(p, p, n)`` is expected to leave the contents of the memory pointed + to by ``p`` unchanged, but may perform (redundant) loads and stores through + the ``n`` bytes pointed to by ``p``. + +C standard library implementations that do not guarantee these properties are +incompatible with Clang and LLVM (and with several other major compilers). + C++ ABI library ---------------
Index: clang/docs/Toolchain.rst =================================================================== --- clang/docs/Toolchain.rst +++ clang/docs/Toolchain.rst @@ -276,6 +276,19 @@ `C standard library <https://en.cppreference.com/w/c>`_ implementations. +Clang and LLVM make some assumptions about the behavior of the C standard +library beyond those required by the C standard: + +* ``memcpy(p, q, 0)`` and ``memmove(p, q, 0)`` are expected to have no effect, + even if ``p`` or ``q`` is a null or otherwise-invalid (but correctly-aligned) + pointer. +* ``memcpy(p, p, n)`` is expected to leave the contents of the memory pointed + to by ``p`` unchanged, but may perform (redundant) loads and stores through + the ``n`` bytes pointed to by ``p``. + +C standard library implementations that do not guarantee these properties are +incompatible with Clang and LLVM (and with several other major compilers). + C++ ABI library ---------------
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits