From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 5E0653858C66 for ; Thu, 12 Jan 2023 16:49:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E0653858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2EF98AD7; Thu, 12 Jan 2023 08:50:11 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.99.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7AA693F587; Thu, 12 Jan 2023 08:49:28 -0800 (PST) From: Richard Sandiford To: Jeff Law via Gcc Mail-Followup-To: Jeff Law via Gcc ,Florian Weimer , Jeff Law , richard.sandiford@arm.com Cc: Florian Weimer , Jeff Law Subject: Re: Default initialization of poly-ints References: <87lemjx3zw.fsf@oldenburg.str.redhat.com> Date: Thu, 12 Jan 2023 16:49:27 +0000 In-Reply-To: (Jeff Law via Gcc's message of "Wed, 4 Jan 2023 13:30:56 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-31.6 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Jeff Law via Gcc writes: > On 1/3/23 04:16, Florian Weimer via Gcc wrote: >> It seems that the default constructor of the non-POD poly-ints does >> nothing. Is this intentional? I expected zero initialization, to match >> regular ints. > I think it was intentional. Richard Sandiford would know for sure. But > Martin Sebor might know as well since I think they discussed it at > length a little while back. Yeah, it was intentional, to try to get -Wunitialized warnings. But it predates C++11 being required, so = default would probably be a better choice now. Thanks, Richard