Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] [sim,rx] Silence warning that turns into a build error
Date: Thu, 8 Apr 2021 17:23:27 -0300	[thread overview]
Message-ID: <07869142-e6ce-b480-56dc-334f2108e4b0@linaro.org> (raw)
In-Reply-To: <YG9krdft/zRx/mcc@vapier>

On 4/8/21 5:16 PM, Mike Frysinger wrote:
> On 08 Apr 2021 16:51, Luis Machado via Gdb-patches wrote:
>> +  FP_Parts a = {0, 0, 0, 0, 0};
> 
> wouldn't it be simpler & equiv:
> 	FP_Parts a = {};
> -mike
> 

I find that it works, but I'm unsure if it is a standard way of doing it.

The C reference says:

"When initializing an object of struct or union type, the initializer 
must be a non-empty, brace-enclosed, comma-separated list of 
initializers for the members."

So I went with the most obvious, as opposed to going shorter and more 
opaque.

  reply	other threads:[~2021-04-08 20:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 19:51 Luis Machado via Gdb-patches
2021-04-08 20:16 ` Mike Frysinger via Gdb-patches
2021-04-08 20:23   ` Luis Machado via Gdb-patches [this message]
2021-04-08 20:25     ` Luis Machado via Gdb-patches
2021-04-08 20:57     ` Mike Frysinger via Gdb-patches
2021-04-09 12:17       ` Luis Machado via Gdb-patches

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=07869142-e6ce-b480-56dc-334f2108e4b0@linaro.org \
    --to=gdb-patches@sourceware.org \
    --cc=luis.machado@linaro.org \
    /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