public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Nick Clifton <nickc@redhat.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH] gas/Dwarf: properly skip zero-size functions
Date: Tue, 9 Aug 2022 17:05:15 +0200	[thread overview]
Message-ID: <ae44b556-1d9c-b275-bcea-bb8244f8cf9f@suse.com> (raw)
In-Reply-To: <d8f2c351-e1fe-c8a1-a405-14b18d38ddf3@redhat.com>

On 09.08.2022 16:51, Nick Clifton wrote:
>> +	  expressionS size = { .X_op = O_constant };
> 
> Does this expression guarantee that the other fields in size are
> initialised to zero ?

Designated initializers set all unmentioned fields to zero just like
initializers of static variables would do: "... all subobjects that
are not initialized explicitly shall be initialized implicitly the
same as objects that have static storage duration" (quoted from C99).

>  If not, then:
> 
>> +#endif
>> +	  if (size.X_op == O_constant && size.X_add_number == 0)
>> +	    continue;
> 
> size.X_add_number could be uninitialized here.
> 
> Apart from fixing that, (if I am right about designated initializers), the
> rest of the patch looks fine to me.

Thanks. I simply didn't want to commit it right away, but give
people already involved in the bug to potentially actually try it
out first. But I'm not going to wait too long with actually
committing it (and also putting it on the branch).

Jan

  reply	other threads:[~2022-08-09 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 11:12 Jan Beulich
2022-08-09 14:51 ` Nick Clifton
2022-08-09 15:05   ` Jan Beulich [this message]
2022-08-09 18:07     ` Martin Liška

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae44b556-1d9c-b275-bcea-bb8244f8cf9f@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).