)]}'
{
  "commit": "344642355ce401c27ea2d57a69d83ec554a9c2bb",
  "tree": "94797bceede4b9b4f8ab14c088c49b2baec70346",
  "parents": [
    "70728e1d396475e8e630bfdd3fb8e8c8211bdbbd"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Thu Mar 02 15:26:55 2023 -0500"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Thu Mar 02 16:02:50 2023 -0500"
  },
  "message": "gdb: fix -Wmaybe-uninitialized warning in value.c\n\nSince commit 11470e70ea0d (\"gdb: store internalvars in an std::map\"), bulding\nwith -O2, with g++ 11.3.0 on Ubuntu 22.04, I see:\n\n      CXX    value.o\n    In constructor ‘internalvar::internalvar(internalvar\u0026\u0026)’,\n        inlined from ‘constexpr std::pair\u003c_T1, _T2\u003e::pair(_U1\u0026\u0026, _U2\u0026\u0026) [with _U1 \u003d const char*\u0026; _U2 \u003d internalvar; typename std::enable_if\u003c(std::_PCC\u003ctrue, _T1, _T2\u003e::_MoveConstructiblePair\u003c_U1, _U2\u003e() \u0026\u0026 std::_PCC\u003ctrue, _T1, _T2\u003e::_ImplicitlyMoveConvertiblePair\u003c_U1, _U2\u003e()), bool\u003e::type \u003canonymous\u003e \u003d true; _T1 \u003d const char*; _T2 \u003d internalvar]’ at /usr/include/c++/11/bits/stl_pair.h:353:35,\n        inlined from ‘constexpr std::pair\u003ctypename std::__strip_reference_wrapper\u003ctypename std::decay\u003c_Tp\u003e::type\u003e::__type, typename std::__strip_reference_wrapper\u003ctypename std::decay\u003c_Tp2\u003e::type\u003e::__type\u003e std::make_pair(_T1\u0026\u0026, _T2\u0026\u0026) [with _T1 \u003d const char*\u0026; _T2 \u003d internalvar]’ at /usr/include/c++/11/bits/stl_pair.h:572:72,\n        inlined from ‘internalvar* create_internalvar(const char*)’ at /home/smarchi/src/binutils-gdb/gdb/value.c:1933:52:\n    /home/smarchi/src/binutils-gdb/gdb/value.c:1831:8: warning: ‘\u003cunnamed\u003e.internalvar::u’ may be used uninitialized [-Wmaybe-uninitialized]\n     1831 | struct internalvar\n          |        ^~~~~~~~~~~\n    /home/smarchi/src/binutils-gdb/gdb/value.c: In function ‘internalvar* create_internalvar(const char*)’:\n    /home/smarchi/src/binutils-gdb/gdb/value.c:1933:76: note: ‘\u003canonymous\u003e’ declared here\n     1933 |   auto pair \u003d internalvars.emplace (std::make_pair (name, internalvar (name)));\n          |                                                                            ^\n\nThis is because the union field internalvar::u is not initialized when\nconstructing the temporary internalvar object above.  That object is then used\nfor move-construction, and the (implicit) move constructor copies the\nuninitialized bytes of field u over from the temporary object to the new\ninternalvar object.  The compiler therefore complains that we use uninitialized\nbytes.  I don\u0027t think it\u0027s really a problem, because the internalvar object is\nin the `kind \u003d\u003d INTERNALVAR_VOID` state, in which the contents of the union is\nirrelevant.  Still, mute the warning by default-initializing the union.\n\nChange-Id: I70c392842f35255f50d8e63f4099cb6685366fb7\nReviewed-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "10a7ce033fdaf9adb217059c35d3dd28649e80aa",
      "old_mode": 33188,
      "old_path": "gdb/value.c",
      "new_id": "7b4df338304835f1dc458b4705176ea2c01a1f00",
      "new_mode": 33188,
      "new_path": "gdb/value.c"
    }
  ]
}
