get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2228311/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2228311,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228311/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/234262f5-2ba4-49ec-8dcf-694fff6b0d84@hexco.de/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/17/?format=api",
        "name": "GNU Compiler Collection",
        "link_name": "gcc",
        "list_id": "gcc-patches.gcc.gnu.org",
        "list_email": "gcc-patches@gcc.gnu.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<234262f5-2ba4-49ec-8dcf-694fff6b0d84@hexco.de>",
    "date": "2026-04-25T22:08:45",
    "name": "-Wenum-conversion documentation fix [PR125020][PR7651]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "259b5d3c55240799426aaeba6af7af0b8c83de02",
    "submitter": {
        "id": 93079,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/93079/?format=api",
        "name": "Heiko Eißfeldt",
        "email": "heiko.Eissfeldt@hexco.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/234262f5-2ba4-49ec-8dcf-694fff6b0d84@hexco.de/mbox/",
    "series": [
        {
            "id": 501490,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501490/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501490",
            "date": "2026-04-25T22:08:45",
            "name": "-Wenum-conversion documentation fix [PR125020][PR7651]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501490/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2228311/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2228311/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=hexco.de header.i=heiko.eissfeldt@hexco.de\n header.a=rsa-sha256 header.s=s1-ionos header.b=vrjFVZVI;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)",
            "sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=hexco.de header.i=heiko.eissfeldt@hexco.de\n header.a=rsa-sha256 header.s=s1-ionos header.b=vrjFVZVI",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=hexco.de",
            "sourceware.org; spf=pass smtp.mailfrom=hexco.de",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=212.227.126.133"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g33kn0jgrz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 26 Apr 2026 08:03:57 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 6235A4BB3BA5\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 22:03:53 +0000 (GMT)",
            "from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133])\n by sourceware.org (Postfix) with ESMTPS id 97DCD4BB3BB8\n for <gcc-patches@gcc.gnu.org>; Sat, 25 Apr 2026 22:03:22 +0000 (GMT)",
            "from client.hidden.invalid by mrelayeu.kundenserver.de (mreue012\n [212.227.15.134]) with ESMTPSA (Nemesis) id 1MRVy9-1w2F3N29DR-00NnQy for\n <gcc-patches@gcc.gnu.org>; Sun, 26 Apr 2026 00:03:20 +0200"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 6235A4BB3BA5",
            "OpenDKIM Filter v2.11.0 sourceware.org 97DCD4BB3BB8"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 97DCD4BB3BB8",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 97DCD4BB3BB8",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777154603; cv=none;\n b=BoDPA4QpszGZg3RmmXGxT0PdRJiwmipIXRLJS42AhqFwm4bwf4rxecEtKg1YhKDdAG7we6QyqpqF4Qfe0DqEUpGJBNI+8vupWd3Yad0w5IFLYPyFMahs5iIGd1UUjxCExEnk6VKQn4imfkPJ2ipPIyPiCUmZ1jv9hf8AHm6p78A=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777154603; c=relaxed/simple;\n bh=rif3lzRi8OQ1zTokfvKqBLlSCj42iG/qd67YhEQjZ/4=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject;\n b=yCo8HaoePM/u7zv+kKi7uSdzFWEgDfrHt9kvXKB+ROzYg5tiAcBw1qY889glF8t57hJkJdzxZzlxM/Wcde6bTiIgLgJujv3LEx6/hiO91400sTqwv9d9nl3Mo7JRfR11PmOWLMqZJwdPyh21zCb2by63yv00F1DPRTTuLj0TM10=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=hexco.de;\n s=s1-ionos; t=1777154600; x=1777759400; i=heiko.eissfeldt@hexco.de;\n bh=SG4P2eRFL0NtNMUsiD0kqz1d51Kz9roKKr3WAC2U4Tg=;\n h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:To:From:Subject:\n Content-Type:cc:content-transfer-encoding:content-type:date:from:\n message-id:mime-version:reply-to:subject:to;\n b=vrjFVZVIHBBXLzE2tarjT7H6c5jjYc/26shzHH9ZrdoGEPAR2j+Jc2KPVvM8LaZb\n D6aVONhGm+0/zmLaAnV9cGRHYIybaadCVM5mMqBxeHhqQlrja/uZeyxy2oqYLtMVF\n U5FJqOtAtVBJNkreoINo/3o95SLOfozqOIF6mJhfcOkFXOmKUXKePRTBCKRATGJH5\n y5W+2mtlkhjshCLaZNRzUJ/Q/ZEou/aujQO98ENt8R/c5RVTN9vdcazngZP0XoVoR\n dQAOzlTj/n3bSxqhhGkR9nuGvI2/1FcxxvLe1ta8Djp0XkuogxOkFL8rdXoy9TzXV\n yE1vLs9MEGmQGyD3hQ==",
        "X-UI-Sender-Class": "55c96926-9e95-11ee-ae09-1f7a4046a0f6",
        "Message-ID": "<234262f5-2ba4-49ec-8dcf-694fff6b0d84@hexco.de>",
        "Date": "Sun, 26 Apr 2026 00:08:45 +0200",
        "MIME-Version": "1.0",
        "User-Agent": "Mozilla Thunderbird",
        "Content-Language": "en-US",
        "To": "gcc-patches@gcc.gnu.org",
        "From": "=?utf-8?q?Heiko_Ei=C3=9Ffeldt?= <heiko.Eissfeldt@hexco.de>",
        "Subject": "[PATCH] -Wenum-conversion documentation fix [PR125020][PR7651]",
        "Content-Type": "multipart/signed; micalg=pgp-sha256;\n protocol=\"application/pgp-signature\";\n boundary=\"------------JM8N0elxmDhgYohZ6Y005D90\"",
        "X-Provags-ID": "V03:K1:MLV8YchiBr0xVoA+ubwQ11tdlbM6PzP+rkx1pJ9aKXyRJ+fObWU\n HpmKxhe5iNakwhM8uPZuxODh3NSFAb/WuKSr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CpLkjQnqlBy9DzHj\n /MLbzU0E3vdF0NodgjPNbtjs6e2ptrnLVq8ci0cEpU9+kqnBAJQyTdvvexkhx5nmLR27QbPU2\n m3R1r26X+bM2zTdmkyQEEe/IoRJp+1RWkW0mF7Z967kEJVZqw6exHN4bIV6qArYCY8qE0XAQH\n DblSBpU1fXYoeN0MNn9qKDglXLItk351NiI1RrEyOcX4RDMSsfRWEaCfn2/HSOg==",
        "X-BeenThere": "gcc-patches@gcc.gnu.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>",
        "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>",
        "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "While investigating PR7651 I found that -Wenum-conversion exists in two forms.\nOriginally it was introduced and documented for C, but later was \"reused\" for\nsomething else in C++, but not documented accordingly.\n\nThe documentation listed for -Wextra the warning\n\n\"(C++ only) An enumerator and a non-enumerator both appear in a condi-\ntional expression.\"\n\nwhich already had its own warning option (-Wenum-conversion). The outdated\ntext was removed.\n\nThis patch cleans up the documentation specifying that -Wenum-conversion\nis available for C and C++. The respective warnings are described individually.\nIt also cleans up the option handling in call.cc for the C++ variant, since now\n-Wextra always implies -Wenum-conversion.\n\nReg tested OK for x86.\n\nThis fixes PR125020 and removes one warning from the TODO list of PR7651.\n\nOk for stage1?\n\n2026-04-25 Heiko Eißfeldt <heiko@hexco.de>\n\n\tPR c++/125020\n\t* gcc/c-family/c.opt: don't filter warning option for C/ObjC\n\t* gcc/doc/invoke.texi:\n\tremove C/ObjC restriction for -Wenum-conversion\n\tremove outdated extra warning text for C++\n\t(which is covered by -Wenum-conversion)\n\tclarify two effects of this warning option (for C and for C++)\n\t* gcc/cp/call.cc: simplify option handling since -Wextra now\n\timplies -Wenum-conversion",
    "diff": "diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt\nindex 3d96a73ecee..ac19b18a40d 100644\n--- a/gcc/c-family/c.opt\n+++ b/gcc/c-family/c.opt\n@@ -748,7 +748,7 @@ C ObjC C++ ObjC++ Var(warn_enum_compare) Init(-1) Warning LangEnabledBy(C ObjC,W\n Warn about comparison of different enum types.\n \n Wenum-conversion\n-C ObjC C++ ObjC++ Var(warn_enum_conversion) Init(0) Warning LangEnabledBy(C ObjC,Wextra)\n+C ObjC C++ ObjC++ Var(warn_enum_conversion) Init(0) Warning EnabledBy(Wextra)\n Warn about implicit conversion of enum types.\n \n Wenum-int-mismatch\ndiff --git a/gcc/cp/call.cc b/gcc/cp/call.cc\nindex 92c3a23ab8d..f093029013c 100644\n--- a/gcc/cp/call.cc\n+++ b/gcc/cp/call.cc\n@@ -6517,7 +6517,7 @@ build_conditional_expr (const op_location_t &loc,\n \t\t\t\"type %qT and enumeration type %qT is deprecated\",\n \t\t\targ2_type, arg3_type);\n \t}\n-      else if ((extra_warnings || warn_enum_conversion)\n+      else if (warn_enum_conversion\n \t       && ((TREE_CODE (arg2_type) == ENUMERAL_TYPE\n \t\t    && !same_type_p (arg3_type, type_promotes_to (arg2_type)))\n \t\t   || (TREE_CODE (arg3_type) == ENUMERAL_TYPE\n@@ -6526,10 +6526,7 @@ build_conditional_expr (const op_location_t &loc,\n \t{\n \t  if (complain & tf_warning)\n \t    {\n-\t      enum opt_code opt = (warn_enum_conversion\n-\t\t\t\t   ? OPT_Wenum_conversion\n-\t\t\t\t   : OPT_Wextra);\n-\t      warning_at (loc, opt, \"enumerated and \"\n+\t      warning_at (loc, OPT_Wenum_conversion, \"enumerated and \"\n \t\t\t  \"non-enumerated type in conditional expression\");\n \t    }\n \t}\ndiff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi\nindex bebe20c5e0b..504689fd72a 100644\n--- a/gcc/doc/invoke.texi\n+++ b/gcc/doc/invoke.texi\n@@ -6907,7 +6907,7 @@ name is still supported, but the newer name is more descriptive.)\n -Wdangling-reference @r{(C++ only)}\n -Wdeprecated-copy @r{(C++ and Objective-C++ only)}\n -Wempty-body\n--Wenum-conversion @r{(only for C/ObjC)}\n+-Wenum-conversion\n -Wexpansion-to-defined\n -Wignored-qualifiers  @r{(only for C/C++)}\n -Wimplicit-fallthrough=3\n@@ -6938,10 +6938,6 @@ following cases:\n A pointer is compared against integer zero with @code{<}, @code{<=},\n @code{>}, or @code{>=}.\n \n-@item\n-(C++ only) An enumerator and a non-enumerator both appear in a\n-conditional expression.\n-\n @item\n (C++ only) Ambiguous virtual bases.\n \n@@ -10422,9 +10418,11 @@ enabled by @option{-Wall}.\n @opindex Wenum-conversion\n @opindex Wno-enum-conversion\n @item -Wenum-conversion\n-Warn when a value of enumerated type is implicitly converted to a\n-different enumerated type.  This warning is enabled by @option{-Wextra}\n-in C@.\n+In C warn when a value of enumerated type is implicitly converted to a\n+different enumerated type.\n+\n+In C++ warn when conditionals have enumerator and non-enumerator\n+operands. This warning is also enabled by @option{-Wextra}.\n \n @opindex Wenum-int-mismatch\n @opindex Wno-enum-int-mismatch\n",
    "prefixes": []
}