From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
To: Joe Perches <joe@perches.com>,
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 20:56:49 +0200 [thread overview]
Message-ID: <123d3606-cebf-4261-4b04-7d53d1fcdb07@prevas.dk> (raw)
In-Reply-To: <dc53b8704ec674cba636b41d7f55bf507a7bd7aa.camel@perches.com>
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?
Rasmus
next prev parent reply other threads:[~2020-03-31 18:56 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 [this message]
2020-03-31 19:00 ` Joe Perches
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=123d3606-cebf-4261-4b04-7d53d1fcdb07@prevas.dk \
--to=rasmus.villemoes@prevas.dk \
--cc=abbotti@mev.co.uk \
--cc=akpm@linux-foundation.org \
--cc=daniel.santos@pobox.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.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®