mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	Vegard Nossum <vegard.nossum@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Daniel Santos <daniel.santos@pobox.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Ian Abbott <abbotti@mev.co.uk>
Subject: Re: [PATCH] compiler.h: fix error in BUILD_BUG_ON() reporting
Date: Tue, 31 Mar 2020 12:00:25 -0700	[thread overview]
Message-ID: <ae25b7b1efcfe4eda9465c4fb4712ede928a33c4.camel@perches.com> (raw)
In-Reply-To: <123d3606-cebf-4261-4b04-7d53d1fcdb07@prevas.dk>

On Tue, 2020-03-31 at 20:56 +0200, Rasmus Villemoes wrote:
> On 31/03/2020 20.20, Joe Perches wrote:
> > On Tue, 2020-03-31 at 13:26 +0200, Vegard Nossum wrote:
> > >  #define compiletime_assert(condition, msg) \
> > > -	_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
> > > +	_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> > 
> > This might be better using something like __LINE__ ## _ ## __COUNTER__
> > 
> > as line # is somewhat useful to identify the specific assert in a file.
> > 
> 
> Eh, if the assert fires, doesn't the compiler's diagnostics already
> contain all kinds of location information?

I presume if that were enough,
neither __LINE__ nor __COUNTER__
would be useful.



  reply	other threads:[~2020-03-31 19:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 11:26 Vegard Nossum
2020-03-31 17:31 ` Masahiro Yamada
2020-03-31 18:20 ` Joe Perches
2020-03-31 18:56   ` Rasmus Villemoes
2020-03-31 19:00     ` Joe Perches [this message]
2020-03-31 19:05       ` Rasmus Villemoes
2020-03-31 19:08       ` Vegard Nossum
2020-04-01  1:12         ` Daniel Santos
2020-03-31 22:30     ` Daniel Santos
2020-03-31 22:25 ` Daniel Santos
2020-03-31 22:36   ` Nathan Chancellor
2020-04-01  0:53     ` 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=ae25b7b1efcfe4eda9465c4fb4712ede928a33c4.camel@perches.com \
    --to=joe@perches.com \
    --cc=abbotti@mev.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=daniel.santos@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=vegard.nossum@oracle.com \
    --cc=yamada.masahiro@socionext.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

all inboxes | Powered by JetHome®