Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2225366/?format=api
{ "id": 2225366, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2225366/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260420214446.565889-1-polacek@redhat.com/", "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": "<20260420214446.565889-1-polacek@redhat.com>", "date": "2026-04-20T21:44:46", "name": "c++/reflection: bogus -Wmissing-field-initializers with <meta> [PR124950]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e69ba5a8a16935c4c9eee92743dcc2fa30e9c82b", "submitter": { "id": 14370, "url": "http://patchwork.ozlabs.org/api/1.1/people/14370/?format=api", "name": "Marek Polacek", "email": "polacek@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260420214446.565889-1-polacek@redhat.com/mbox/", "series": [ { "id": 500689, "url": "http://patchwork.ozlabs.org/api/1.1/series/500689/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=500689", "date": "2026-04-20T21:44:46", "name": "c++/reflection: bogus -Wmissing-field-initializers with <meta> [PR124950]", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500689/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2225366/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2225366/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=J7FRhBeM;\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=J7FRhBeM", "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 4fzzYm5Sntz1yD8\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 07:45:31 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 970244CCCA34\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 21:45:29 +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 732F04A98F0C\n for <gcc-patches@gcc.gnu.org>; Mon, 20 Apr 2026 21:45:03 +0000 (GMT)", "from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-444-rPxk2hT3MjS6A-VMjAudOQ-1; Mon,\n 20 Apr 2026 17:44:59 -0400", "from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id CB21C18004AD; Mon, 20 Apr 2026 21:44:58 +0000 (UTC)", "from pdp-11.lan (unknown [10.22.81.30])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id C80E03000C23; Mon, 20 Apr 2026 21:44:57 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 970244CCCA34", "OpenDKIM Filter v2.11.0 sourceware.org 732F04A98F0C" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 732F04A98F0C", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 732F04A98F0C", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776721503; cv=none;\n b=EU1aVSc3Yew6uJjxfjRs6eotcNDIdwWhsHqJ6WKEmPZC2/phhF/Fg64Uh7LzP6iD3Ykx+8rnZrvEe5vZJlL6xC9E3kf4Hoyz3zGcjWWMTEdUITTL9OkhQ4dkd5pVz5cWjQD79r5zVFz2pBmZ9Jy+jUN4T8JgbBcF9LaOEbfXmdU=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776721503; c=relaxed/simple;\n bh=pdNwZ1TN/MVEkBkf80QZAgkc/r4SmY1BX/lHg+/KLyg=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=NzfvIu2IN8AqFvtl4tLKJ9cqBc9ZamjAtybQicnJn+v8QH32ETJjPYp7x+o5cs1EiHUZVD7CtnrhkTrSQMYw4qnaRxHLLeFPo3myXAldFi6W0Mr/cZWVb/lkLjmH+eR8+7mfnhVeaYurIiBdOaCMs4/Idrf4ygU9tkKpjXQ2Nbs=", "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=1776721503;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=0r841yrDfLG0pBjzKHvtKEmDcRz4YC9CtK7jL0By/nI=;\n b=J7FRhBeMhscuTY8M6i+WvegecBKA50z39xUTE9xzMKsvlX2FJjilE6wcNw4uXpWsMZoik0\n tUaS6AqbBzG7hLwgP5OQZhLxTQkDh0tq1l+sIf6s/Kvtp2q5LBvW/LpYqBAj9az7iNOKya\n Y2WInuX1Bq0kvfw7jHgvsRE2d4PFCZE=", "X-MC-Unique": "rPxk2hT3MjS6A-VMjAudOQ-1", "X-Mimecast-MFC-AGG-ID": "rPxk2hT3MjS6A-VMjAudOQ_1776721499", "From": "Marek Polacek <polacek@redhat.com>", "To": "Jakub Jelinek <jakub@redhat.com>, Jason Merrill <jason@redhat.com>,\n GCC Patches <gcc-patches@gcc.gnu.org>, libstdc++ <libstdc++@gcc.gnu.org>,\n Jonathan Wakely <jwakely@redhat.com>", "Subject": "[PATCH] c++/reflection: bogus -Wmissing-field-initializers with\n <meta> [PR124950]", "Date": "Mon, 20 Apr 2026 17:44:46 -0400", "Message-ID": "<20260420214446.565889-1-polacek@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.4", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "znyLF-_hYb5jLT0xsK5rS96y_321D-n3GGqzeHWD5JI_1776721499", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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": "Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?\n\n-- >8 --\nWe emit -Wmissing-field-initializers warnings for code like\n\n data_member_spec (^^int, { .name = \"dms\" })\n\nwhich seems undesirable. We can initialize the members of\nstd::meta::data_member_options to suppress that warning (clang's <meta>\nhas these initializers too).\n\n\tPR c++/124950\n\nlibstdc++-v3/ChangeLog:\n\n\t* include/std/meta (std::meta::data_member_options): Initialize\n\tname, alignment, bit_width, and annotations members.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/reflect/data_member_spec7.C: New test.\n---\n gcc/testsuite/g++.dg/reflect/data_member_spec7.C | 8 ++++++++\n libstdc++-v3/include/std/meta | 8 ++++----\n 2 files changed, 12 insertions(+), 4 deletions(-)\n create mode 100644 gcc/testsuite/g++.dg/reflect/data_member_spec7.C\n\n\nbase-commit: 416fe77efb4ff6adf39c3326d462161217b75b42", "diff": "diff --git a/gcc/testsuite/g++.dg/reflect/data_member_spec7.C b/gcc/testsuite/g++.dg/reflect/data_member_spec7.C\nnew file mode 100644\nindex 00000000000..bdcdb1ee773\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/reflect/data_member_spec7.C\n@@ -0,0 +1,8 @@\n+// PR c++/124950\n+// { dg-do compile { target c++26 } }\n+// { dg-additional-options \"-freflection -Wmissing-field-initializers\" }\n+// Test that we don't emit bogus -Wmissing-field-initializers warnings.\n+\n+#include <meta>\n+using namespace std::meta;\n+constexpr auto dms = data_member_spec (^^int, { .name = \"dms\" });\ndiff --git a/libstdc++-v3/include/std/meta b/libstdc++-v3/include/std/meta\nindex 22b4da44cdd..69016a621ef 100644\n--- a/libstdc++-v3/include/std/meta\n+++ b/libstdc++-v3/include/std/meta\n@@ -423,11 +423,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n \tinfo _M_unused = {};\n };\n \n- optional<_Name> name;\n- optional<int> alignment;\n- optional<int> bit_width;\n+ optional<_Name> name = nullopt;\n+ optional<int> alignment = nullopt;\n+ optional<int> bit_width = nullopt;\n bool no_unique_address = false;\n- vector<info> annotations;\n+ vector<info> annotations = {};\n };\n consteval info data_member_spec(info, data_member_options);\n consteval bool is_data_member_spec(info);\n", "prefixes": [] }