[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080820105922.GC18524@elte.hu>
Date: Wed, 20 Aug 2008 12:59:22 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Boaz Harrosh <bharrosh@...asas.com>
Cc: Rusty Russell <rusty@...tcorp.com.au>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Alexey Dobriyan <adobriyan@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Sam Ravnborg <sam@...nborg.org>
Subject: Re: [PATCH] debug: fix BUILD_BUG_ON() for non-constant expressions
* Boaz Harrosh <bharrosh@...asas.com> wrote:
> If the user of virtio_has_feature() must pass a compile-time constant
> then it must be converted to a MACRO, and then the BUILD_BUG_ON will
> work. Or it should be changed to a BUG_ON() if fbit is a runtime
> variable.
well, that's the question i'm asking: that sort of proposed
BUILD_BUG_ON() variantcannot be used in inline functions like
virtio_has_feature() does. If we get forced back to macros that's not an
improvement.
Maybe the link-time last-line-of-defense mechanism i posed is the most
flexible one perhaps after all? (it's ugly too but none of this is
particularly pretty)
hm?
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists