public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ed at catmur dot uk" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106074] Spurious Wstringop-overflow for int-to-string with SSE4 Date: Thu, 07 Jul 2022 12:16:53 +0000 [thread overview] Message-ID: <bug-106074-4-LjCtO4pLGc@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106074-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106074 --- Comment #1 from Ed Catmur <ed at catmur dot uk> --- Another example, using Date 3.0.1: #include <date/date.h> void f(std::istream s) { std::chrono::system_clock::time_point tp; date::from_stream(s, "%Y", tp); } https://godbolt.org/z/fscqTd947 In file included from /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_pair.h:61, from /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:64, from /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/algorithm:60, from /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:44, from <source>:1: In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&, const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&, char&, const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6474:9: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&, char&, const char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 19 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [3, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 19 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&, const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&, char&, const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6474:9: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&, char&, const char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 20 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [4, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 20 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&, const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&, char&, const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6474:9: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&, char&, const char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 21 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [5, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 21 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&, const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&, char&, const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6474:9: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&, char&, const char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 22 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [6, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 22 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6501:1, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6474:9: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 19 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [3, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 19 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6501:1, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6474:9: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 20 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [4, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 20 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6501:1, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6474:9: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 21 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [5, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 21 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6501:1, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6474:9: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, CharT, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {int&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 22 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [6, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 22 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {const char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 19 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [3, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 19 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {const char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 20 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [4, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 20 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {const char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 21 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [5, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 21 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {const char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {const char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 22 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [6, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 22 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 19 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [3, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 19 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 20 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [4, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 20 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 21 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [5, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 21 into destination object 'buf' of size 11 In function 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = char]', inlined from 'constexpr void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = char*; _ForwardIterator2 = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algobase.h:182:11, inlined from 'constexpr void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, random_access_iterator_tag) [with _RandomAccessIterator = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1107:18, inlined from 'constexpr void std::reverse(_BIter, _BIter) [with _BIter = char*]' at /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:1134:21, inlined from 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&}]' at /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6513:21: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/move.h:205:11: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 205 | __a = _GLIBCXX_MOVE(__b); | ^ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h: In function 'void date::detail::read(std::basic_istream<_CharT, _Traits>&, int, Args&& ...) [with CharT = char; Traits = std::char_traits<char>; Args = {char&}]': /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 22 into destination object 'buf' of size 11 6506 | CharT buf[std::numeric_limits<unsigned>::digits10+2u] = {}; | ^~~ /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset [6, 11] into destination object 'buf' of size 11 /opt/compiler-explorer/libs/date/v3.0.1/include/date/date.h:6506:15: note: at offset 22 into destination object 'buf' of size 11
next prev parent reply other threads:[~2022-07-07 12:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-24 8:59 [Bug c++/106074] New: " ed at catmur dot uk 2022-07-07 12:16 ` ed at catmur dot uk [this message] 2023-05-18 3:58 ` [Bug tree-optimization/106074] " pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-106074-4-LjCtO4pLGc@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).