From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id DD39622037 for ; Tue, 19 Mar 2024 22:36:35 +0100 (CET) Received: (qmail 17591 invoked by uid 550); 19 Mar 2024 21:32:04 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 17550 invoked from network); 19 Mar 2024 21:32:04 -0000 Date: Tue, 19 Mar 2024 17:36:41 -0400 From: Rich Felker To: NRK Cc: =?utf-8?B?SuKCkeKCmeKCmw==?= Gustedt , musl@lists.openwall.com, Mike Cui Message-ID: <20240319213640.GN4163@brightrain.aerifal.cx> References: <20240318213441.GH4163@brightrain.aerifal.cx> <627epdel4gidvu46u5ua2mclieqy3wwqbs7sxjgtgrsmkvn4up@ehu5ru6micnr> <20240319131833.GI4163@brightrain.aerifal.cx> <20240319154222.GK4163@brightrain.aerifal.cx> <20240319160832.GL4163@brightrain.aerifal.cx> <20240319173930.57b8eb30@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Potential bug in __res_msend_rc() wrt to union initialization. On Tue, Mar 19, 2024 at 09:04:41PM +0000, NRK wrote: > > actually the introduction of `{}` versus `{0}` in C23 was not meant to > > provide any difference in semantics, just to make the syntax nicer and > > consistent with C++. > > Regardless of what the intention was, the reality is that it *does* have > semantic difference. Specifically, empty initialization `{}` benefits > from the default initialization rules, which specify zero-ing out the > padding bits whereas `{0}` doesn't guarantee that. That's simply not true. There is no difference in the rules as specified by the standard. Rich