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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rusty Russell
Date: Wednesday, October 1, 2008 - 10:35 pm

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:
[PATCH 2/5] net/niu: Fix none-const BUILD_BUG_ON usage, Boaz Harrosh, (Mon Sep 1, 6:11 am)
[PATCH 3/5] virtio: Fix none-const BUILD_BUG_ON usage, Boaz Harrosh, (Mon Sep 1, 6:13 am)
Re: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-con ..., Rusty Russell, (Wed Oct 1, 10:35 pm)