Skip to content

Commit fa92132

Browse files
committed
#2397: disable gcc-10 stringop-overflow warning for fmt code
1 parent 4a478f7 commit fa92132

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/fmt/include/fmt-vt/base.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,12 @@ FMT_CONSTEXPR20 auto copy(InputIt begin, InputIt end, OutputIt out)
20312031
template <typename T, typename InputIt, typename OutputIt,
20322032
FMT_ENABLE_IF(!is_back_insert_iterator<OutputIt>::value)>
20332033
FMT_CONSTEXPR auto copy(InputIt begin, InputIt end, OutputIt out) -> OutputIt {
2034+
#ifdef __GNUC__
2035+
#pragma GCC diagnostic push
2036+
#pragma GCC diagnostic ignored "-Wstringop-overflow"
20342037
while (begin != end) *out++ = static_cast<T>(*begin++);
2038+
#pragma GCC diagnostic pop
2039+
#endif
20352040
return out;
20362041
}
20372042

0 commit comments

Comments
 (0)