Closed runlevel5 closed 2 years ago
Which bit of code trips this warning/error? From https://github.com/wwylele/teakra/issues/51 it looks like it is from the stdlib itself?
/usr/include/c++/12/bits/std_function.h:243:11: error: ‘*(std::_Function_base*)((char*)&<unnamed>[1] + offsetof(const Teakra::BitFieldSlot, Teakra::BitFieldSlot::set.std::function<void(short unsigned int)>::<unnamed>.std::_Maybe_unary_or_binary_function<void, short unsigned int>::<unnamed>)).std::_Function_base::_M_manager’ may be used uninitialized [-Werror=maybe-uninitialized]
243 | if (_M_manager)
| ^~~~~~~~~~
In this case, shouldn't GCC fix itself?
@wwylele we still have to wait for that happening upstream; for the time-being disabling -Werror=maybe-uninitialized
(which is the default of pre-12) would help Fedora 36 team to get more apps successfully compiled. I will revert this PR once the upstream GCC is patched
Fixes
51
Why?
GCC12 has made
-Werror=maybe-uninitialized
a default, it is too aggressive which leads to code error