From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D5FFE3858C33; Sat, 29 Oct 2022 12:27:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5FFE3858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667046474; bh=MlYmK7bYpwBeqKmMjh847wFp6/rHXNXhAcdPGFWaS+w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vZ9qsiARGH53fV2kRTcOnGkqTi63Kqo3os5DzWnk1wb+tZgP4OOCuX4rIE5+7DQuc k0D22Q336kVDUST+N1D87r/yVRdYLK3IGdjQQnK9qVfoH+7FIpPlsNfUQ4ci2HGeYa WpRBkZXphugFxw86x17cj7mXeFcQjq1BELlJgDvc= From: "chfast at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96868] C++20 designated initializer erroneous warnings Date: Sat, 29 Oct 2022 12:27:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: chfast at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96868 --- Comment #6 from Pawe=C5=82 Bylica --- The workaround is=20 MyObj obj =3D {}; which at least suggests some inconsistency in the compiler internals. For me this warning should be disabled in C++ when designated initializers = are used and all other fields are value initialized.=