Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2225763/?format=api
{ "id": 2225763, "url": "http://patchwork.ozlabs.org/api/patches/2225763/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/aeeOi00Sv-Bt873g@redhat.com/", "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": "<aeeOi00Sv-Bt873g@redhat.com>", "list_archive_url": null, "date": "2026-04-21T14:49:47", "name": "[v2] c++/reflection: bogus -Wmissing-field-initializers with <meta> [PR124950]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "7e31f9bbd726291ef75b11c95784e4a4226b13a4", "submitter": { "id": 14370, "url": "http://patchwork.ozlabs.org/api/people/14370/?format=api", "name": "Marek Polacek", "email": "polacek@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/aeeOi00Sv-Bt873g@redhat.com/mbox/", "series": [ { "id": 500830, "url": "http://patchwork.ozlabs.org/api/series/500830/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=500830", "date": "2026-04-21T14:49:47", "name": "[v2] c++/reflection: bogus -Wmissing-field-initializers with <meta> [PR124950]", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/500830/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2225763/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2225763/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=Y5diyvRN;\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=Y5diyvRN", "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 4g0QJN6TPVz1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 00:50:27 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 7B4234BA23CA\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 14:50:25 +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 B9B8B4BA543C\n for <gcc-patches@gcc.gnu.org>; Tue, 21 Apr 2026 14:49:52 +0000 (GMT)", "from mail-qk1-f198.google.com (mail-qk1-f198.google.com\n [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-14-gucmQ4DCO5GIO97OouvVMQ-1; Tue, 21 Apr 2026 10:49:51 -0400", "by mail-qk1-f198.google.com with SMTP id\n af79cd13be357-8ee454b1b8cso100361285a.0\n for <gcc-patches@gcc.gnu.org>; Tue, 21 Apr 2026 07:49:51 -0700 (PDT)", "from redhat.com ([2603:7000:9500:10::1db4])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8e7d64cce76sm1129891385a.14.2026.04.21.07.49.48\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 21 Apr 2026 07:49:49 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 7B4234BA23CA", "OpenDKIM Filter v2.11.0 sourceware.org B9B8B4BA543C" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org B9B8B4BA543C", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org B9B8B4BA543C", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776782992; cv=none;\n b=q2gzgSZkca2r+7LMEHw/RsslsB9bWjTaoNyICsF6qYFESroKRTIDyCw2jgfofNYAtPd6Fk2lz/STVUXu2Im4FT5zgQGnlt4N+6e8NoqWwARWNbID9ZCpMdLKfr89IdnaywioJ/qUALx0Tn5lXkQHnHA5+o1gn3BQ4x8m+zLaXZ8=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776782992; c=relaxed/simple;\n bh=54844OeNuZwYp7bpzP4P5JjQhBFaN5E1rwebFWqzKOs=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=pomjQAaGAwbQaFIP+R2ogjv4zVhnlA9L6Id0WYDMb3QKhUgkUPSlSipgkHb3Jcec185ApHQKfX4WFtSlHbEs/6sUqngvqkyeTZV/p6uPxUe+7BvDOYV49kQgeuG9CAjQKz8eba1Qmu8ycBq0naAkgJhoUXxx2RS9YrLxhizYpbI=", "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=1776782992;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=anK9qaPn8/SYTBRX8urH3xV+lXOP81R1Z7l0sMuH5pE=;\n b=Y5diyvRNyTl+gIOJfzhSLFX48+kCtNU5Zd2FFm4O3CA19fXx3dBbFwkYPg82seYkkhTr7w\n dSXfKgLARD/q0ArhgUa49FWArucw3LW2NG83HztK8zRmjnOSL0bRYlrv/1pBLl5RPe73/C\n l26fcW6GTWo4uH2WGlO/iYlx2ruHjSs=", "X-MC-Unique": "gucmQ4DCO5GIO97OouvVMQ-1", "X-Mimecast-MFC-AGG-ID": "gucmQ4DCO5GIO97OouvVMQ_1776782990", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776782990; x=1777387790;\n h=user-agent:in-reply-to:content-disposition:mime-version:references\n :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=anK9qaPn8/SYTBRX8urH3xV+lXOP81R1Z7l0sMuH5pE=;\n b=AYetzd4+39AI66QJ7ao6xGcEgCYvBw9gh/fpayiZOEq7Gi5ZE9EEwBsl/Wg+gwrEK4\n wdjvIbeg05XCaNOmI8VsjtkxB2zTKVKY4GbgK5VdjZSShqZkPUgffTRijzGd8XaMAqRJ\n tK37v4GNA6dI1ijBhJNiqEcLzGy9NZJtP8HlwFTc5N/tI3vEmDI+mTxoIYKoHtpaud6v\n 4Oq7sEO2scS8XJct7z4+3WuWKyCSjTM/tsqpl3vBsomqFaCI6T32/jBSw374VZj3FHS+\n wX7dJGJ5b0b5a0DEaqQGy82DKWE3dFeKFU/5JhIyzwcwmzKNOxuObywaSZsDrSRwH2sZ\n yCPQ==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ8LUDlZc2wvrO7TkErDk9XyiMV5ct/TK1SrV4VPHwwaftofOOZ7JHfJnDwtJKqZV3OH+0JZRhJZCz4FdA==@gcc.gnu.org", "X-Gm-Message-State": "AOJu0YwSW3Jeq1ynHzWhiXDwR0lMVff7v1J5ISV1KsXwtCgrxABTGYsp\n 5XDpGMp/9KckrlxO/W7JqvcwSRgSxZIKsXPciQ5zGJvpSHPMWg+DVjZRBIHo2Z1OI17vnqZxVtf\n i9PPveTBihf/EAaYDdbmaFPat7t4XG5JOY/rgdDCKRoeqF24ppxgr6SrA1Z8=", "X-Gm-Gg": "AeBDieszf4CxcFjf8WoXs9fs94+KvIWQmKbgKohYq1lJAgqdUjrRkZQ0IbP1wX/TFdd\n 3nU7JrYTEFtrouP+DK4t8XkT5SPODiOXp5ifhQJohLig/3tTUYFoelJ+F3jWymTZDuC5/lPKhDT\n r+2ZR4S8dfVZxdQqtLD2Us360wVqz+pU1xqTJGqqXyFjm7Asi4SE5xk8CD9DBVglRI2sOH/nV7p\n 68Jqq6xkEZZssk/ada73hkY076HgGTHRKG3viDxzvoYTT29t8IjxlM4lwhqmD/I/+JAKYeeca3f\n iUfsDpQAqaruM973yE6pzVZGbyIzj2j+m9PNfJslmn+YPkH33km15tBysiohYbAHewXXgD6awhf\n eCCjQ7JkNDCZa", "X-Received": [ "by 2002:a05:620a:290c:b0:8c7:a53:4d17 with SMTP id\n af79cd13be357-8e790016b7amr2752077785a.21.1776782990432;\n Tue, 21 Apr 2026 07:49:50 -0700 (PDT)", "by 2002:a05:620a:290c:b0:8c7:a53:4d17 with SMTP id\n af79cd13be357-8e790016b7amr2752069885a.21.1776782989826;\n Tue, 21 Apr 2026 07:49:49 -0700 (PDT)" ], "Date": "Tue, 21 Apr 2026 10:49:47 -0400", "From": "Marek Polacek <polacek@redhat.com>", "To": "Jonathan Wakely <jwakely.gcc@gmail.com>", "Cc": "Tim Song <t.canens.cpp@gmail.com>, Jakub Jelinek <jakub@redhat.com>,\n Jason Merrill <jason@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>,\n libstdc++ <libstdc++@gcc.gnu.org>, Jonathan Wakely <jwakely@redhat.com>,\n Barry Revzin <barry.revzin@gmail.com>", "Subject": "[PATCH v2] c++/reflection: bogus -Wmissing-field-initializers with\n <meta> [PR124950]", "Message-ID": "<aeeOi00Sv-Bt873g@redhat.com>", "References": "<20260420214446.565889-1-polacek@redhat.com>\n <CAPQZVxvQjkyMSiXc=eeyV=qXhLpsR_sY7kGPVnNBbYPBp9ZSjQ@mail.gmail.com>\n <CAH6eHdTx=KiL_k+i=_QOVOLfwEevvtenyFVV_kBb-OV08CAsSw@mail.gmail.com>", "MIME-Version": "1.0", "In-Reply-To": "\n <CAH6eHdTx=KiL_k+i=_QOVOLfwEevvtenyFVV_kBb-OV08CAsSw@mail.gmail.com>", "User-Agent": "Mutt/2.3.1 (2026-03-20)", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "l4je02gt4CP4I5QWxcvlXgiYXWBsvNyB6IlNs4MSvNc_1776782990", "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>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "On Tue, Apr 21, 2026 at 07:19:13AM +0100, Jonathan Wakely wrote:\n> On Tue, 21 Apr 2026, 02:43 Tim Song, <t.canens.cpp@gmail.com> wrote:\n> \n> > Might be better to leave out the initializer for name since not specifying\n> > it is pretty unusual? That matches what Barry proposed in some version of\n> > P3795 before it was removed in an LWG telecon (for lack of normative\n> > effect).\n> >\n> \n> Yes, I think that was what LWG agreed with, but couldn't say so in the\n> standard wording.\n\nThat means that we'll emit a warning with\n\n data_member_spec (^^int, { .bit_width = 8 })\n\nwhich I don't like, but if that's what's been decided, here's an\nupdated patch.\n \n> And would it be simpler to initialize alignment and bit_width with {}\n> instead of nullopt? There's only one constructor that's viable for {} so no\n> need to do resolution to find the best match for =nullopt.\n\nDone.\n\nTested reflect/*, 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\talignment, 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 | 9 +++++++++\n libstdc++-v3/include/std/meta | 6 +++---\n 2 files changed, 12 insertions(+), 3 deletions(-)\n create mode 100644 gcc/testsuite/g++.dg/reflect/data_member_spec7.C\n\n\nbase-commit: 6adc49fc08cb87b0e7c8ead3176b45dae2ff4e2a", "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..057db043bf8\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/reflect/data_member_spec7.C\n@@ -0,0 +1,9 @@\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\" });\n+constexpr auto dms2 = data_member_spec (^^int, { .bit_width = 8 }); // { dg-warning \"missing initializer\" }\ndiff --git a/libstdc++-v3/include/std/meta b/libstdc++-v3/include/std/meta\nindex 22b4da44cdd..b12f49a2096 100644\n--- a/libstdc++-v3/include/std/meta\n+++ b/libstdc++-v3/include/std/meta\n@@ -424,10 +424,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION\n };\n \n optional<_Name> name;\n- optional<int> alignment;\n- optional<int> bit_width;\n+ optional<int> alignment = {};\n+ optional<int> bit_width = {};\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": [ "v2" ] }