News for hackers. Stuff that matters.
Re:Clang emits memcpy for std::swap, which can introduce und... by kazinator on Sunday April 24, 2016 @05:37PM (#11561477)
Clang is not a complete implementation without a library, right? Whoever puts Clang together with a library becomes an integrator who provides a language implementation. It's up to that integrator to ensure that the result conforms.

Clang could be also used "freestanding". Then the user might be informed: please supply your own memcpy function with such and such characteristics, since generated code needs it.

If those characteristics are just those described in ISO C, but the compiler needs something more, then that's a problem between clang and the user.

Re:Clang emits memcpy for std::swap, which can introduce und... by chandlerc1024 on Sunday April 24, 2016 @06:14PM (#11561611)
Essentially.

But I think Clang can actually do better here. The open source project is essentially providing integration with glibc and other libcs and we don't do a reasonable job of being conservative there where we don't know what requirements that layer places upon things like memcpy.