This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/86471] GCC/libstdc++ outputs inferior code for std::fill and std::fill_n vs std::memset on c-style arrays


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

--- Comment #13 from Matt Bentley <mattreecebentley at gmail dot com> ---
(In reply to Jonathan Wakely from comment #12)
> Also you're doing a reinterpret_cast from an arbitrary iterator type, which
> is not necessarily a pointer, or even a random access iterator.
> 
> Since you don't have a copyright assignment in place please leave the patch
> to us, this is less than helpful :-)

Well it's more that you're doing- at any rate, the issue you've noted is easily
bypassed by changing the "reinterpret_cast<void *>(__first)" to
"reinterpret_cast<void *>(&*(__first))".
Cheers.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]