From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ECB05385842F; Thu, 23 Nov 2023 15:37:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECB05385842F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700753852; bh=Jl8wewog+F5GPbFcCc+ap1EwlL1gC6jyZ+43gVDrEdE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y2HREXLNDJSTI8E7O4MifABeLfC9b9Q9JKe6ERFWEzQ9ZHBKMUwRKm075CnblKfK0 ERttfErgOgEhAu60dUybfZOOrkkYd9v5XJ17Nuv8UBSEG3YplJdZTOvK/MBfATp2iR mOQInqXOHR61sbh4s4VoRowbC+EiZbr0Iqf47JSc= From: "paisanafc at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/112666] Missed optimization: Value initialization zero-initializes members with user-defined constructor Date: Thu, 23 Nov 2023 15:37:32 +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: 11.4.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paisanafc at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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=3D112666 --- Comment #4 from Francisco Paisana --- One last thing, I might have misread this as well.=20 > "Zero-initialization is performed in the following situations: > ... > 2) As part of value-initialization sequence [...] for members of > value-initialized class types that have no constructors." I was interpreting it as "members that have no ctors of classes are zero-in= it". However, this could be also read as "members of classes, where the classes = have no ctor, are zero-init."=