building with g++-12.1.0 breaks with unintitialised variable errors
xacc_cxx-12.1.0.txt
In file included from /usr/include/c++/12.1.0/bits/new_allocator.h:36,
from /usr/include/c++/12.1.0/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
from /usr/include/c++/12.1.0/bits/allocator.h:46,
from /usr/include/c++/12.1.0/string:41,
from /home/sard/dev/xacc/tpls/cppmicroservices/third_party/json/json.h:362,
from /home/sard/dev/xacc/tpls/cppmicroservices/third_party/jsoncpp.cpp:76:
In function ‘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 = Json::Value::ValueHolder]’,
inlined from ‘void Json::Value::swapPayload(Json::Value&)’ at /home/sard/dev/xacc/tpls/cppmicroservices/third_party/jsoncpp.cpp:2678:12,
inlined from ‘bool Json::Reader::readValue()’ at /home/sard/dev/xacc/tpls/cppmicroservices/third_party/jsoncpp.cpp:385:31:
/usr/include/c++/12.1.0/bits/move.h:205:7: error: ‘v.Json::Value::value_’ may be used uninitialized [-Werror=maybe-uninitialized]
205 | __a = _GLIBCXX_MOVE(__b);
| ^~~
/home/sard/dev/xacc/tpls/cppmicroservices/third_party/jsoncpp.cpp: In member function ‘bool Json::Reader::readValue()’:
/home/sard/dev/xacc/tpls/cppmicroservices/third_party/jsoncpp.cpp:384:11: note: ‘v’ declared here
384 | Value v;
| ^
building with g++-12.1.0 breaks with unintitialised variable errors xacc_cxx-12.1.0.txt