From: Janis Johnson <janis187@us.ibm.com>
To: Matthew Dobson <colpatch@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>, Paul Jackson <pj@sgi.com>,
Janis Johnson <janis187@us.ibm.com>,
Darren Hart <dvhltc@us.ibm.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] cpumask_t initializers
Date: Sat, 20 Nov 2004 10:55:07 -0800 [thread overview]
Message-ID: <20041120185507.GA4122@us.ibm.com> (raw)
In-Reply-To: <1100915156.4653.13.camel@arrakis>
On Fri, Nov 19, 2004 at 05:45:57PM -0800, Matthew Dobson wrote:
>
> Janis Johnson, a GCC hacker, told me the following:
>> Extra parens can be thrown away in expressions, but the syntax for
>> initializers has curly braces on the outside of the list. GCC doesn't
>> seem to mind if there are parens outside the braces for a struct
>> initializer, but that's probably a bug and could change in a future
>> version of GCC's C parser.
>
> So, in order to both make my code compile and future-proof (heh) the
> CPU_MASK_* initializers I wrote up this little patch. This DEFINITELY
> needs to be tested further (I've compile-tested it on x86, x86 NUMA,
> x86_64 & ppc64), but the good news is that any breakage from the patch
> will be compile-time breakage and should be obvious.
>
> The fact that GCC's parser may change in the future to disallow struct
> initializers wrapped in parens kind of scares me, because just about
> every struct initializer I've ever seen in the kernel is wrapped in
> parens!! This needs to be delved into further, but I'm leaving for home
> for a week for Thanksgiving and will have limited access to email.
I'm not an expert on the C language (I just pass for one in this
building) so this ought to be looked at by someone who is. As for
changes to the C parser, Joseph Myers is writing a recursive-descent
C parser for GCC tentatively slated to replace the existing C parser
for GCC 4.1.
Janis
prev parent reply other threads:[~2004-11-20 18:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-20 1:45 [RFC PATCH] cpumask_t initializers Matthew Dobson
2004-11-20 5:17 ` Paul Jackson
2004-11-20 18:55 ` Janis Johnson [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=20041120185507.GA4122@us.ibm.com \
--to=janis187@us.ibm.com \
--cc=akpm@osdl.org \
--cc=colpatch@us.ibm.com \
--cc=dvhltc@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.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