From: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ppcfix.diff
Date: Mon, 29 Nov 2004 18:12:12 +0000 [thread overview]
Message-ID: <20041129181210.GO26051@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.53.0411291843360.9120@yvahk01.tjqt.qr>
On Mon, Nov 29, 2004 at 06:44:14PM +0100, Jan Engelhardt wrote:
> >> if (!cpus_empty(keepmask)) {
> >> - cpumask_t irqdest = { .bits[0] = openpic_read(&ISR[irq]->Destination) };
> >> + cpumask_t irqdest;
> >> + irqdest.bits[0] = openpic_read(&ISR[irq]->Destination);
> >
> >Not an equivalent replacement. The former means "set irqdest.bits[0] to
> ><expression> and set the rest of fields/array elements in them to zero/null".
>
> Really? I thought zero'ing only happens for static storage.
Two different issues - behaviour when no initializer is given and behaviour
when initializer does not cover everything.
IOW,
static int a1[4]; /* all zeroes, since it's non-auto */
static int a2[4] = {1,0,0,0} /* 1 0 0 0, we have initialized them all */
static int a3[4] = {1} /* 1 0 0 0, missing members are zeroed */
void f(void)
{
int b1[4]; /* undefined contents */
int b2[4] = {1,0,0,0} /* 1 0 0 0, we have initialized them all */
int b3[4] = {1} /* 1 0 0 0, missing members are zeroed */
C99 6.7.8(21) and 6.7.8(10) deal with "not covers everything" and
"no initializer at all" resp.
prev parent reply other threads:[~2004-11-29 18:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-29 15:40 ppcfix.diff hugang
2004-11-29 16:42 ` ppcfix.diff Jan Engelhardt
2004-11-29 17:04 ` ppcfix.diff Adrian Bunk
2004-11-29 17:22 ` ppcfix.diff Al Viro
2004-11-29 17:44 ` ppcfix.diff Jan Engelhardt
2004-11-29 18:12 ` Al Viro [this message]
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=20041129181210.GO26051@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®