Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-const expressions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Boaz Harrosh <bharrosh@...>
Cc: Ingo Molnar <mingo@...>, David S. Miller <davem@...>, Ivo van Doorn <IvDoorn@...>, John W. Linville <linville@...>, Alexey Dobriyan <adobriyan@...>, Andrew Morton <akpm@...>, Theodore Tso <tytso@...>, Linus Torvalds <torvalds@...>, Jan Beulich <jbeulich@...>, linux-kernel <linux-kernel@...>
Date: Thursday, October 2, 2008 - 1:35 am

On Wednesday 03 September 2008 01:57:31 Boaz Harrosh wrote:

Why did you hate the void cast again? Simplest should
be "(void)BUILD_BUG_ON_ZERO(e)". But if not, it seems to me that it's
cleaner to do:

#define BUILD_BUG_ON(e) \
do { } while(BUILD_BUG_ON_ZERO(e))

No chance of the compiler emitting unused vars.

Cheers,
Rusty.

--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-const..., Rusty Russell, (Thu Oct 2, 1:35 am)
[PATCH 3/5] virtio: Fix none-const BUILD_BUG_ON usage, Boaz Harrosh, (Mon Sep 1, 9:13 am)
[PATCH 2/5] net/niu: Fix none-const BUILD_BUG_ON usage, Boaz Harrosh, (Mon Sep 1, 9:11 am)