https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93059

--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to fdlbxtqi from comment #6)
> > > clearly incorrect
> > 
> > Please distinguish between what is wrong (generated code crashes, or returns
> > 3 instead of 2), and what is suboptimal.
> 
> Suppose #ifdef __cpp_lib_is_constant_evaluated is not defined (for C++17)
> 
> It becomes:
>         return __builtin_memmove(__dst, __src, sizeof(_Tp) * __num);
>       return __dst;
> 
> ?????

I should have kept the whole quote:

> 1. libstdc++ does not use memmove for different trivially copyable objects. 
> It only uses it for the same type which is clearly incorrect.

Reply via email to