News for hackers. Stuff that matters.
Re:Toward _FORTIFY_SOURCE Parity Between Clang and GCC by rurban on Thursday February 13, 2020 @10:57AM (#22318696)
I doubt that you can fault clang with this behavior, because clang has a proper constexpr detection in C also, gcc only on C++.

So clang detects much more optimization opportunities with constant arguments, making it about 20x faster on the typical memcpy sizeof,... It's even faster than the glibc HW specific vectorized assembler optimizations, because the compiler knows much more than glibc, e.g. alignment, size. asm is an optimization barrier.

This is probably the reason clang has a different bos check than gcc.

There are no comments on this comment yet.