get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218307,
    "url": "http://patchwork.ozlabs.org/api/patches/2218307/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/acxL7FfABu_h6v0A@tucnak/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/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,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<acxL7FfABu_h6v0A@tucnak>",
    "list_archive_url": null,
    "date": "2026-03-31T22:34:20",
    "name": "c++, v2: Implement LWG4517 - data_member_spec should throw for cv-qualified unnamed bit-fields",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8f2882803e4583d5dc884e1ec9e4e9aa9402b41b",
    "submitter": {
        "id": 671,
        "url": "http://patchwork.ozlabs.org/api/people/671/?format=api",
        "name": "Jakub Jelinek",
        "email": "jakub@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/acxL7FfABu_h6v0A@tucnak/mbox/",
    "series": [
        {
            "id": 498259,
            "url": "http://patchwork.ozlabs.org/api/series/498259/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498259",
            "date": "2026-03-31T22:34:20",
            "name": "c++, v2: Implement LWG4517 - data_member_spec should throw for cv-qualified unnamed bit-fields",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498259/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218307/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218307/checks/",
    "tags": {},
    "related": [],
    "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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=erTRHiOj;\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 (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=erTRHiOj",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "sourceware.org; spf=pass smtp.mailfrom=redhat.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124"
        ],
        "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 4fljc4672fz1yFv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 09:34:59 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 114204B7A1C7\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 22:34:56 +0000 (GMT)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id 1527C4BA902D\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 22:34:28 +0000 (GMT)",
            "from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-112-R1USUwnWMFSLV4EhvtKZ6Q-1; Tue,\n 31 Mar 2026 18:34:26 -0400",
            "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 5F4FD195609D\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 22:34:25 +0000 (UTC)",
            "from tucnak.zalov.cz (unknown [10.44.32.9])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 930511954102; Tue, 31 Mar 2026 22:34:24 +0000 (UTC)",
            "from tucnak.zalov.cz (localhost [127.0.0.1])\n by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 62VMYL1S135456\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Wed, 1 Apr 2026 00:34:21 +0200",
            "(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 62VMYLH6135392;\n Wed, 1 Apr 2026 00:34:21 +0200"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 114204B7A1C7",
            "OpenDKIM Filter v2.11.0 sourceware.org 1527C4BA902D"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 1527C4BA902D",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 1527C4BA902D",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774996468; cv=none;\n b=Lyyry6g6IM+I8oU44jPnyUL7DdXxkjWRjnDafonhBqU8xtZ7dQEeWEOb1Un25sSp1262x4aJnbju01YVFtOW6mMulgfGIx/H3z/He/UrcYtEbND+0wxQqL38T9WfYQlOXWMcLrOMmOmQosJkeBnDur51Pj8eHdD8FrnBqoxYlvQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774996468; c=relaxed/simple;\n bh=5WxgqIX4EjvQhUSi6NNAzGLtdaGW6H4TJNOhpO3gUxQ=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=qjyDbz8ZQmpDMPZQkSa+hJBNgQFeBUsbKUfQWcgWO0THr/IABlKZupZq0ui5jPNDsUC72S4M6960FIQBqByegBovvcKsxhArPZ/LGcIuZ4Ken/gkR4ZGZJ5HJqq449m7TTJroV7hmj+pczjKVzmDHC3EBfMY9JkpjjQBxq7KHGw=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1774996467;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type:in-reply-to:in-reply-to:  references:references;\n bh=EarVns8frQKGBNf1ftWKTlU40uetLMUcQO7HgL0+tjM=;\n b=erTRHiOjHxdqyc/CySDNRkZS0cjXyR7ujV44rJeLI9eSsjuLRFuXKa4Mp1SaRfXQIxjP4P\n lhE74JoTPc7eQSpM3H2S5xku+HR/4Gcsda+JoqNB4HeK3V7gZ2FP3B2Tyjcm8OubKe0HN2\n e9Z6znQQlnU2iccl6A8tmavd/ByhlUI=",
        "X-MC-Unique": "R1USUwnWMFSLV4EhvtKZ6Q-1",
        "X-Mimecast-MFC-AGG-ID": "R1USUwnWMFSLV4EhvtKZ6Q_1774996465",
        "Date": "Wed, 1 Apr 2026 00:34:20 +0200",
        "From": "Jakub Jelinek <jakub@redhat.com>",
        "To": "Jason Merrill <jason@redhat.com>, Marek Polacek <polacek@redhat.com>",
        "Cc": "gcc-patches@gcc.gnu.org",
        "Subject": "[PATCH] c++, v2: Implement LWG4517 - data_member_spec should throw\n for cv-qualified unnamed bit-fields",
        "Message-ID": "<acxL7FfABu_h6v0A@tucnak>",
        "References": "<acueqU9pjmEoV2-M@tucnak>\n <acvn8KzKkpZUFQPO@redhat.com>",
        "MIME-Version": "1.0",
        "In-Reply-To": "<acvn8KzKkpZUFQPO@redhat.com>",
        "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "Sv_si_geQg5I3mC6Q993w1VbzarQsZUi9CILNcCR9Lg_1774996465",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "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>",
        "Reply-To": "Jakub Jelinek <jakub@redhat.com>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "On Tue, Mar 31, 2026 at 11:27:44AM -0400, Marek Polacek wrote:\n> > +      if (args[1] == NULL_TREE\n> > +\t  && eval_is_const (type, REFLECT_UNDEF) == boolean_true_node)\n> > +\treturn throw_exception (loc, ctx, \"name unspecified and type is const\",\n> > +\t\t\t\tfun, non_constant_p, jump_target);\n> > +      if (args[1] == NULL_TREE\n> > +\t  && eval_is_volatile (type, REFLECT_UNDEF) == boolean_true_node)\n> > +\treturn throw_exception (loc, ctx,\n> > +\t\t\t\t\"name unspecified and type is volatile\",\n> > +\t\t\t\tfun, non_constant_p, jump_target);\n> \n> I think I'd just check \"args[1] == NULL_TREE\" once:\n> \n>   /* LWG4517 ...  */\n>   if (args[1] == NULL_TREE)\n>     {\n>       if (eval_is_const ())\n>         return throw_exception ();\n>       if (eval_is_volatile ())\n> \treturn throw_exception ();\n>     }\n\nOk, done below (also updated against latest trunk, i.e. m_name instead of 1).\n\n> > --- gcc/testsuite/g++.dg/reflect/data_member_spec2.C.jj\t2026-03-27 10:17:16.118298364 +0100\n> > +++ gcc/testsuite/g++.dg/reflect/data_member_spec2.C\t2026-03-31 12:05:23.886107143 +0200\n> > @@ -86,6 +86,11 @@ static_assert (!valid_data_member_spec (\n> >  static_assert (!valid_data_member_spec (^^decomp, { .name = \"dms\" }));\n> >  static_assert (!valid_data_member_spec (^^decomp_ref, { .name = \"dms\" }));\n> >  static_assert (!valid_data_member_spec (^^arr, { .name = \"dms\" }));\n> \n> Might add a // LWG4517 comment.\n\nDone as well.\n\n2026-04-01  Jakub Jelinek  <jakub@redhat.com>\n\n\t* reflect.cc (eval_data_member_spec): Implement C++26 LWG4517\n\t- data_member_spec should throw for cv-qualified unnamed bit-fields.\n\n\t* g++.dg/reflect/data_member_spec2.C: Add tests for unnamed bit-fields\n\twith const and/or volatile types.\n\n\n\n\tJakub",
    "diff": "--- gcc/cp/reflect.cc.jj\t2026-03-31 11:43:08.470682834 +0200\n+++ gcc/cp/reflect.cc\t2026-04-01 00:19:08.098892518 +0200\n@@ -5910,6 +5910,17 @@ eval_data_member_spec (location_t loc, c\n       if (tree_int_cst_sgn (args[m_bit_width]) < 0)\n \treturn throw_exception (loc, ctx, \"bit_width is negative\",\n \t\t\t\tfun, non_constant_p, jump_target);\n+      if (args[m_name] == NULL_TREE)\n+\t{\n+\t  if (eval_is_const (type, REFLECT_UNDEF) == boolean_true_node)\n+\t    return throw_exception (loc, ctx,\n+\t\t\t\t    \"name unspecified and type is const\",\n+\t\t\t\t    fun, non_constant_p, jump_target);\n+\t  if (eval_is_volatile (type, REFLECT_UNDEF) == boolean_true_node)\n+\t    return throw_exception (loc, ctx,\n+\t\t\t\t    \"name unspecified and type is volatile\",\n+\t\t\t\t    fun, non_constant_p, jump_target);\n+\t}\n     }\n   if (args[m_alignment])\n     {\n--- gcc/testsuite/g++.dg/reflect/data_member_spec2.C.jj\t2026-03-27 10:17:16.118298364 +0100\n+++ gcc/testsuite/g++.dg/reflect/data_member_spec2.C\t2026-03-31 12:05:23.886107143 +0200\n@@ -86,6 +86,12 @@ static_assert (!valid_data_member_spec (\n static_assert (!valid_data_member_spec (^^decomp, { .name = \"dms\" }));\n static_assert (!valid_data_member_spec (^^decomp_ref, { .name = \"dms\" }));\n static_assert (!valid_data_member_spec (^^arr, { .name = \"dms\" }));\n+// LWG4517 - data_member_spec should throw for cv-qualified unnamed bit-fields\n+static_assert (!valid_data_member_spec (^^const int, { .bit_width = 3 }));\n+static_assert (!valid_data_member_spec (^^volatile short, { .bit_width = 7 }));\n+static_assert (!valid_data_member_spec (^^const int, { .bit_width = 0 }));\n+static_assert (!valid_data_member_spec (^^volatile short, { .bit_width = 0 }));\n+static_assert (!valid_data_member_spec (^^const volatile char, { .bit_width = 2 }));\n \n constexpr auto dms = data_member_spec (^^int, { .name = \"dms\" });\n static_assert (!valid_data_member_spec (dms, { .name = \"dms\" }));\n",
    "prefixes": []
}