)]}'
{
  "commit": "23cdd9431ad424b092c65419d47ef4601168a1c9",
  "tree": "afb675baa8627d111c515e4b733f4f915fd7d7f0",
  "parents": [
    "e8f6050cfb990452fcfc685bc9ccbae79113fa36"
  ],
  "author": {
    "name": "Hannes Domani",
    "email": "ssbssa@yahoo.de",
    "time": "Wed Mar 20 18:02:06 2024 +0100"
  },
  "committer": {
    "name": "Hannes Domani",
    "email": "ssbssa@yahoo.de",
    "time": "Wed Mar 20 18:02:06 2024 +0100"
  },
  "message": "Fix reinterpret_cast for classes with multiple inheritance\n\nCurrently a reinterpret_cast may change the pointer value if\nmultiple inheritance is involved:\n```\n(gdb) p r\n$1 \u003d (Right *) 0x22f75c\n(gdb) p reinterpret_cast\u003cLeftRight*\u003e(r)\n$2 \u003d (LeftRight *) 0x22f758\n```\n\nIt\u0027s because value_cast is called in this case, which automatically\ndoes up- and downcasting.\n\nFixed by simply using the target pointer type in a copy of the\noriginal value:\n```\n(gdb) p r\n$1 \u003d (Right *) 0x3bf87c\n(gdb) p reinterpret_cast\u003cLeftRight*\u003e(r)\n$2 \u003d (LeftRight *) 0x3bf87c\n```\n\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d18861\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5c7f9dc8a1ce1ba2ffb4e397ea68e51dad6c63ca",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.cp/casts.cc",
      "new_id": "eacd8bc0a44e1e9cbb2dcfab9f11d649b5511a44",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.cp/casts.cc"
    },
    {
      "type": "modify",
      "old_id": "7bfc93b1a0250e820f73bd50e48553542685495f",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.cp/casts.exp",
      "new_id": "ca82ab084b9cb7f3b7571241dc0759dcaeaf9ae2",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.cp/casts.exp"
    },
    {
      "type": "modify",
      "old_id": "be907440a59ba75f8eac7fed6c97b9997bd47ef0",
      "old_mode": 33188,
      "old_path": "gdb/valops.c",
      "new_id": "1a943f0fc78fcf1f4ffb1769613f3475d80d6b52",
      "new_mode": 33188,
      "new_path": "gdb/valops.c"
    }
  ]
}
