)]}'
{
  "commit": "d3d4840e802ef6ee4353872401ded5cc5cf87ecb",
  "tree": "fb441bab5344d7f1b3ec07912cc6c2888f885325",
  "parents": [
    "2084a5debfa7ab82e94baecdb66695eb1627817e"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Thu Mar 20 11:16:59 2025 +0100"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Thu Mar 20 11:16:59 2025 +0100"
  },
  "message": "[gdb/build] Fix build with gcc 9\n\nSince commit a691853148f (\"gdb/python: introduce gdbpy_registry\"), when\nbuilding gdb with gcc 9, I run into:\n...\nIn file included from gdb/varobj.c:38:0:\ngdb/python/python-internal.h:1211:47: error: expected ‘;’ before ‘\u003c’ token\n   using StorageKey \u003d typename registry\u003cO\u003e::key\u003cStorage\u003e;\n                                               ^\n...\ndue to this code:\n...\ntemplate \u003ctypename Storage\u003e\nclass gdbpy_registry\n{\n  ...\n\n  template\u003ctypename O\u003e\n  using StorageKey \u003d typename registry\u003cO\u003e::key\u003cStorage\u003e;\n\n  template\u003ctypename O\u003e\n  Storage *get_storage (O *owner, const StorageKey\u003cO\u003e \u0026key) const\n  { ... }\n\n  ...\n}\n...\n\nAs an experiment, I tried out eliminating the type alias:\n...\n  template\u003ctypename O\u003e\n  Storage *get_storage (O *owner,\n                        const typename registry\u003cO\u003e::key\u003cStorage\u003e \u0026key) const\n  { ... }\n...\nand got instead:\n...\nIn file included from gdb/varobj.c:38:0:\ngdb/python/python-internal.h:1211:63: error: non-template ‘key’ used as template\n  Storage *get_storage (O *owner,\n                        const typename registry\u003cO\u003e::key\u003cStorage\u003e \u0026key) const\n                                                     ^~~\ngdb/python/python-internal.h:1211:63: note: use ‘registry\u003cO\u003e::template key’ \\\n  to indicate that it is a template\n...\n\nFollowing that suggestion, I tried:\n...\n  template\u003ctypename O\u003e\n  Storage *\n  get_storage (O *owner,\n               const typename registry\u003cO\u003e::template key\u003cStorage\u003e \u0026key) const\n  { ... }\n...\nwhich fixed the problem.\n\nLikewise, adding the template keyword in the type alias fixes the original\nproblem, so fix it like that.\n\nTested on x86_64-linux.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5e6707346f9e86ec9753a0c3d5e54499c4a9cdf0",
      "old_mode": 33188,
      "old_path": "gdb/python/python-internal.h",
      "new_id": "3f1a2067fdb02ba73dd5c05cb5124c5fe2536ae9",
      "new_mode": 33188,
      "new_path": "gdb/python/python-internal.h"
    }
  ]
}
