mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Jan Beulich" <JBeulich@suse.com>
Cc: <rusty@rustcorp.com.au>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] utilize _Static_assert() for BUILD_BUG_ON() when the compiler supports it
Date: Mon, 5 Nov 2012 14:29:44 -0800	[thread overview]
Message-ID: <20121105142944.7b16e6a4.akpm@linux-foundation.org> (raw)
In-Reply-To: <5093EB1C02000078000A61D7@nat28.tlf.novell.com>

On Fri, 02 Nov 2012 14:47:40 +0000
"Jan Beulich" <JBeulich@suse.com> wrote:

> This makes the resulting diagnostics quite a bit more useful.

So asserts Jan, but to confirm it I would need to download, configure,
build and install a different gcc version, which sounds rather a hassle.

So, please show us an exmple of these diagnostics in the changelog.

> --- 3.7-rc3/include/linux/bug.h
> +++ 3.7-rc3-static-assert/include/linux/bug.h
> @@ -27,8 +27,15 @@ struct pt_regs;
>     result (of value 0 and type size_t), so the expression can be used
>     e.g. in a structure initializer (or where-ever else comma expressions
>     aren't permitted). */
> +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)

This sort of logic is normally performed via the
include/linux/compiler*.h system.  And

	grep __GNUC include/linux/*.h

indicates that we've been pretty successful.  Can we do that here too?

(eg: suppose the Intel compiler supports _Static_assert?)


  parent reply	other threads:[~2012-11-05 22:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-02 14:47 Jan Beulich
2012-11-05  2:19 ` Rusty Russell
2012-11-05  8:46   ` Jan Beulich
2012-11-05 22:29 ` Andrew Morton [this message]
2012-11-06  1:51   ` Rusty Russell
2012-11-06  9:23     ` Jan Beulich
2012-11-07  1:03       ` Rusty Russell
2012-11-07  8:05         ` Jan Beulich
2012-11-07 23:24           ` Rusty Russell
2012-12-13  0:29             ` Daniel Santos
2012-12-13  9:43               ` Jan Beulich
2012-12-13 21:20                 ` Daniel Santos
2012-12-13  0:48       ` Daniel Santos

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=20121105142944.7b16e6a4.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=JBeulich@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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

Powered by JetHome