Re: [PATCH] libstdc++: Fix incorrect use of memset in ranges::fill_n (PR 94017)

2020-03-03 Thread Jonathan Wakely
On 03/03/20 17:13 -0500, Patrick Palka wrote: On Tue, 3 Mar 2020, Patrick Palka wrote: When deciding whether to perform the memset optimization in ranges::fill_n, we were crucially neglecting to check whether the output pointer's value type is a byte type. This patch adds such a check to the p

Re: [PATCH] libstdc++: Fix incorrect use of memset in ranges::fill_n (PR 94017)

2020-03-03 Thread Patrick Palka
n with integral<_Tp>, following discussion on IRC. -- >8 -- Subject: [PATCH] libstdc++: Fix incorrect use of memset in ranges::fill_n (PR 94017) When deciding whether to perform the memset optimization in ranges::fill_n, we were crucially neglecting to check whether the output pointer&#

[PATCH] libstdc++: Fix incorrect use of memset in ranges::fill_n (PR 94017)

2020-03-03 Thread Patrick Palka
When deciding whether to perform the memset optimization in ranges::fill_n, we were crucially neglecting to check whether the output pointer's value type is a byte type. This patch adds such a check to the problematic condition in ranges::fill_n. I think the __is_byte<_Tp>::__value check, which c