|
Boost : |
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2024-07-16 11:14:32
On 7/16/24 13:08, Ruben Perez via Boost wrote:
>
> Other than that, there are numerous warnings, and I assume most (or
> all) of them are spurious. The rest of my email contains the warnings
> I got with the libraries that produced them, in case the authors want
> to fix them.
>
> 1. Boost.Log (warning repeats several times):
> #22 212.1 In file included from /usr/include/c++/13.2.1/string:42,
> #22 212.1 from libs/log/src/date_time_format_parser.cpp:18:
> #22 212.1 In static member function 'static constexpr
> std::char_traits<char>::char_type*
> std::char_traits<char>::copy(char_type*, const char_type*,
> std::size_t)',
> #22 212.1 inlined from 'static constexpr void
> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*,
> const _CharT*, size_type) [with _CharT = char; _Traits =
> std::char_traits<char>; _Alloc = std::allocator<char>]' at
> /usr/include/c++/13.2.1/bits/basic_string.h:430:21,
> #22 212.1 inlined from 'constexpr std::__cxx11::basic_string<_CharT,
> _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits,
> _Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type)
> [with _CharT = char; _Traits = std::char_traits<char>; _Alloc =
> std::allocator<char>]' at
> /usr/include/c++/13.2.1/bits/basic_string.tcc:542:16,
> #22 212.1 inlined from 'constexpr std::__cxx11::basic_string<_CharT,
> _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits,
> _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with
> _CharT = char; _Traits = std::char_traits<char>; _Alloc =
> std::allocator<char>]' at
> /usr/include/c++/13.2.1/bits/basic_string.h:2208:19,
> #22 212.1 inlined from 'constexpr std::__cxx11::basic_string<_CharT,
> _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits,
> _Alloc>::replace(__const_iterator, __const_iterator, const _CharT*,
> const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>;
> _Alloc = std::allocator<char>]' at
> /usr/include/c++/13.2.1/bits/basic_string.h:2417:22,
> #22 212.1 inlined from 'constexpr std::__cxx11::basic_string<_CharT,
> _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits,
> _Alloc>::append(_InputIterator, _InputIterator) [with _InputIterator =
> const char*; <template-parameter-2-2> = void; _CharT = char; _Traits =
> std::char_traits<char>; _Alloc = std::allocator<char>]' at
> /usr/include/c++/13.2.1/bits/basic_string.h:1519:31,
> #22 212.1 inlined from 'void
> boost::log::v2_mt_posix::aux::{anonymous}::common_flags<CallbackT>::add_literal(const
> char_type*, const char_type*) [with CallbackT =
> boost::log::v2_mt_posix::aux::date_format_parser_callback<char>]' at
> libs/log/src/date_time_format_parser.cpp:100:25,
> #22 212.1 inlined from 'void
> boost::log::v2_mt_posix::aux::{anonymous}::parse_format(const CharT*,
> const CharT*, ParserT&, CallbackT&) [with CharT = char; ParserT =
> date_flags<common_flags<boost::log::v2_mt_posix::aux::date_format_parser_callback<char>
>>> ; CallbackT =
> boost::log::v2_mt_posix::aux::date_format_parser_callback<char>]' at
> libs/log/src/date_time_format_parser.cpp:336:35,
> #22 212.1 inlined from 'void
> boost::log::v2_mt_posix::aux::parse_date_format(const CharT*, const
> CharT*, date_format_parser_callback<CharT>&) [with CharT = char]' at
> libs/log/src/date_time_format_parser.cpp:353:17:
> #22 212.1 /usr/include/c++/13.2.1/bits/char_traits.h:435:56: warning:
> 'void* __builtin_memcpy(void*, const void*, long unsigned int)'
> accessing 9223372036854775808 or more bytes at offsets
> [-4611686018427387904, 4611686018427387903] and 0 may overlap up to
> 9223372036854775809 bytes at offset -1 [-Wrestrict]
> #22 212.1 435 | return static_cast<char_type*>(__builtin_memcpy(__s1,
> __s2, __n));
> #22 212.1 | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
Please, report it to gcc devs, it's coming from std::basic_string::append.
In my experience, this sort of warnings from gcc is completely broken
and and nothing but spam in the output.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk