From: Joe Perches <joe@perches.com>
To: Jim Cromie <jim.cromie@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [00/02] add BUILD_BUG_DECL assertion (for 3.4??)
Date: Mon, 09 Apr 2012 13:08:03 -0700 [thread overview]
Message-ID: <1334002083.3228.15.camel@joe2Laptop> (raw)
In-Reply-To: <CAJfuBxxBY3Mq3EnuginFw_JkK3AE15V-u6C7uvi2L03tFfHOXQ@mail.gmail.com>
On Mon, 2012-04-09 at 13:52 -0600, Jim Cromie wrote:
> On Sun, Apr 8, 2012 at 8:37 PM, Joe Perches <joe@perches.com> wrote:
> > Discontiguous array definitions must be ugly.
> Ugly ?
> too pejorative IMO
Ugly code is not a pejorative, it's more an
artifact of creation and always a beholder
issue.
> each array defn is a single statement.
I thought you meant the array entries not
the arrays themselves.
> there may be functions between the 2 defns being compared.
>
> Maybe not ideal,
>
> >
> >> Do you see advantages other than stylistic ones ?
> >
> > Not really.
> >
> > Contiguous declarations.
> > No need for other markings.
> >
> > Seems useful enough.
> >
>
> OK. Id expect your construct to be built upon mine,
> we'd still need to start with something.
>
> Also, mine is usable for things yours isnt.
> I dont have a good example, but a simple/silly one is:
>
> BUILD_BUG_DECL( wifi_channels_must_be_14,
> ARRAY_SIZE(channels_table) == 14 );
Do what you think best.
I think it's a solution for a relatively
minor problem.
The BUILD_BUG_DECL marking might be improved.
BUILD_BUG_DECL might be a bit short or not
descriptive enough.
Maybe BUILD_BUG_DIFF_SIZE or BUILD_BUG_SIZE_NE?
prev parent reply other threads:[~2012-04-09 20:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-08 22:38 Jim Cromie
2012-04-08 22:38 ` [PATCH 1/2] bug.h: add BUILD_BUG_DECL, usable at file scope Jim Cromie
2012-04-08 22:38 ` =?y?q?=5BPATCH=202/2=5D=20bug=2Eh=3A=20add=20test/demo=20module?= Jim Cromie
2012-04-08 22:52 ` [00/02] add BUILD_BUG_DECL assertion (for 3.4??) Joe Perches
2012-04-08 23:59 ` Jim Cromie
2012-04-09 2:37 ` Joe Perches
2012-04-09 19:52 ` Jim Cromie
2012-04-09 20:08 ` Joe Perches [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=1334002083.3228.15.camel@joe2Laptop \
--to=joe@perches.com \
--cc=jim.cromie@gmail.com \
--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®