When I compiled Kakoune on Arch Linux I loved that there were no warnings at all, however when I started to use Fedora on other PC, I have a lot of warnings about list lifetime while compiling:
In file included from unicode.hh:7,
from utf8.hh:5,
from string.hh:7,
from alias_registry.hh:5,
from alias_registry.cc:1:
array_view.hh: In instantiation of ‘constexpr Kakoune::ArrayView<T>::ArrayView(const std::initializer_list<_Tp>&) [with T = const Kakoune::StringView]’:
string_utils.hh:120:18: required from ‘Kakoune::String Kakoune::format(Kakoune::StringView, Types&& ...) [with Types = {Kakoune::String}]’
string_utils.hh:135:44: required from here
array_view.hh:39:48: warning: initializing ‘Kakoune::ArrayView<const Kakoune::StringView>::m_pointer’ from ‘std::initializer_list<const Kakoune::StringView>::begin’ does not extend the lifetime of the underlying array [-Winit-list-lifetime]
39 | : m_pointer(v.begin()), m_size(v.size()) {}
| ^
For most of files.
I’m not sure if these warnings could be a source of any problems, when using Kakoune on Fedora, and the source of warnings may be that Fedora has newer GCC compiler: g++ (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1)
whether Arch Linux has an older 8.3.0-1
. I wonder if anyone have these warnings experienced any kind of problem? Should this be fixed? Lifetimes are important as far as I understand.