{
 "number": 36623,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36623",
 "title": "build: enable `-Wunreachable-code-aggressive`",
 "author": "fanquake",
 "author_association": "MEMBER",
 "created_at": "2026-10-23T14:12:03Z",
 "updated_at": "2026-10-31T09:08:58Z",
 "description_hash": "2dc7860a331d0ac8",
 "age_days": 9,
 "draft": true,
 "labels": [
  "Build system",
  "CI failed"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "537d2882f43f60a0268601f9c3ef1b4c6be42859",
 "head_ref": "unreachable_aggressive",
 "head_repo": "fanquake/bitcoin",
 "head_history": [
  {
   "t": "2026-10-27T13:49:37Z",
   "sha": "537d2882f43f60a0268601f9c3ef1b4c6be42859"
  }
 ],
 "additions": 11,
 "deletions": 6,
 "changed_files": 5,
 "commit_count": 3,
 "size_bucket": "S",
 "mergeable_state": "unstable",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {},
   "conflicts": []
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "hodlinator",
   "willcl-ark"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": true,
  "mergeable_state": "unstable",
  "last_author_activity": "2026-10-30T15:36:25Z",
  "last_reviewer_activity": "2026-10-31T09:08:58Z",
  "last_reviewer": "hodlinator",
  "author_silent_days": 2,
  "waiting_on_author_days": 1,
  "days_since_update": 1
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "src/script/interpreter.cpp"
 ],
 "body": "Swap `-Wunreachable-code` for `-Wunreachable-code-aggressive` which also enables `-Wunreachable-code-return` and `-Wunreachable-code-break`.\n\nBased on:\n* https://github.com/bitcoin-core/minisketch/pull/106",
 "commits": [
  {
   "sha": "ca3f028ac62a055cab4bf16550fb494c8beef911",
   "date": "2026-10-27T13:49:25Z",
   "message": "[nomerge] minisketch changes"
  },
  {
   "sha": "303f4e8d6d8bf14405951c7dcf1add9960df14df",
   "date": "2026-10-27T13:49:25Z",
   "message": "refactor: fix -Wunreachable-code-aggressive warnings"
  },
  {
   "sha": "537d2882f43f60a0268601f9c3ef1b4c6be42859",
   "date": "2026-10-27T13:49:26Z",
   "message": "build: swap -Wunreachable-code for aggressive variant\n\nEnables `-Wunreachable-code-break` and `-Wunreachable-code-return`."
  }
 ],
 "timeline": [
  {
   "t": "2026-10-23T14:57:25Z",
   "kind": "review_comment",
   "who": "willcl-ark",
   "assoc": "MEMBER",
   "path": "src/script/interpreter.cpp",
   "commit": "537d2882f43f60a0268601f9c3ef1b4c6be42859",
   "in_reply_to": null,
   "text": "It does appear that this is likely removable too.",
   "id": "rc:4360922575",
   "url": "https://github.com/bitcoin/bitcoin/pull/36623#discussion_r4360922575",
   "hash": "640a23608cbc5bfe",
   "edited": null
  },
  {
   "t": "2026-10-27T13:49:37Z",
   "kind": "force_push",
   "who": "fanquake",
   "commit": "537d2882f43f60a0268601f9c3ef1b4c6be42859",
   "id": "push:537d2882f43f60a0268601f9c3ef1b4c6be42859"
  },
  {
   "t": "2026-10-30T15:36:25Z",
   "kind": "review_comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "path": "src/script/interpreter.cpp",
   "commit": "537d2882f43f60a0268601f9c3ef1b4c6be42859",
   "in_reply_to": 4360922575,
   "text": "Happy to do what reviewers prefer here.",
   "id": "rc:4425423079",
   "url": "https://github.com/bitcoin/bitcoin/pull/36623#discussion_r4425423079",
   "hash": "d5b784d4cdb82b3f",
   "edited": "2026-10-30T15:36:26Z"
  },
  {
   "t": "2026-10-31T09:08:58Z",
   "kind": "review_comment",
   "who": "hodlinator",
   "assoc": "MEMBER",
   "path": "src/script/interpreter.cpp",
   "commit": "537d2882f43f60a0268601f9c3ef1b4c6be42859",
   "in_reply_to": 4360922575,
   "text": "FWIW the least worst solution to me seems to be removing the break together with the braces, so this `case` gets formatting like the `default` at the end:\nhttps://github.com/bitcoin/bitcoin/blob/15ba42294eb57bd4850da0a830741c35aa8b46cc/src/script/interpreter.cpp#L1227-L1228\n\n```diff\n--- a/src/script/interpreter.cpp\n+++ b/src/script/interpreter.cpp\n@@ -675,18 +675,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&\n                 break;\n\n                 case OP_RETURN:\n-                {\n                     return set_error(serror, SCRIPT_ERR_OP_RETURN);\n-                }\n-#if defined(__clang__)\n-#pragma clang diagnostic push\n-#pragma clang diagnostic ignored \"-Wunreachable-code-break\"\n-#endif\n-                break;\n-#if defined(__clang__)\n-#pragma clang diagnostic pop\n-#endif\n-\n\n                 //\n                 // Stack ops\n```",
   "id": "rc:4431191907",
   "url": "https://github.com/bitcoin/bitcoin/pull/36623#discussion_r4431191907",
   "hash": "b1eb7076503b6d0b",
   "edited": null
  }
 ],
 "labels_log": [
  {
   "t": "2026-10-23T14:12:08Z",
   "action": "labeled",
   "label": "Build system",
   "who": "DrahtBot"
  },
  {
   "t": "2026-10-23T15:20:03Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 1429,
 "text_tokens_estimate": 357,
 "changed_paths": [
  "CMakeLists.txt",
  "src/minisketch/src/minisketch.cpp",
  "src/qt/rpcconsole.cpp",
  "src/script/interpreter.cpp",
  "src/util/tokenpipe.cpp"
 ],
 "files": [
  {
   "path": "CMakeLists.txt",
   "add": 1,
   "del": 1
  },
  {
   "path": "src/minisketch/src/minisketch.cpp",
   "add": 0,
   "del": 1
  },
  {
   "path": "src/qt/rpcconsole.cpp",
   "add": 3,
   "del": 3
  },
  {
   "path": "src/script/interpreter.cpp",
   "add": 7,
   "del": 0
  },
  {
   "path": "src/util/tokenpipe.cpp",
   "add": 0,
   "del": 1
  }
 ],
 "test_lines": 0,
 "git": {
  "head": "537d2882f43f60a0268601f9c3ef1b4c6be42859",
  "head_matches_backup": true,
  "base": "15ba42294eb57bd4850da0a830741c35aa8b46cc",
  "patch_id": "2f07bf0703f3bfa5",
  "commits": [
   {
    "sha": "ca3f028ac6",
    "subject": "[nomerge] minisketch changes",
    "files": 1,
    "add": 0,
    "del": 1
   },
   {
    "sha": "303f4e8d6d",
    "subject": "refactor: fix -Wunreachable-code-aggressive warnings",
    "files": 3,
    "add": 10,
    "del": 4
   },
   {
    "sha": "537d2882f4",
    "subject": "build: swap -Wunreachable-code for aggressive variant",
    "files": 1,
    "add": 1,
    "del": 1
   }
  ],
  "patch_truncated": false
 },
 "patch_id": "2f07bf0703f3bfa5",
 "input_hash": "9d0c87e1577ec451",
 "extracted_at": "2026-11-02T01:09:49+00:00"
}