Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 19 Mar 2024 17:36:41 -0400
From: Rich Felker <dalias@...c.org>
To: NRK <nrk@...root.org>
Cc: Jā‚‘ā‚™ā‚› Gustedt <jens.gustedt@...ia.fr>,
	musl@...ts.openwall.com, Mike Cui <cuicui@...il.com>
Subject: Re: 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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.