[lkml]   [2008]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] debug: fix BUILD_BUG_ON() for non-constant expressions

* Boaz Harrosh <> 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

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)



 \ /
  Last update: 2008-08-20 13:03    [W:0.235 / U:3.124 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site