[lkml]   [2008]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] debug: fix BUILD_BUG_ON() for non-constant expressions
On Wednesday 20 August 2008 02:33:59 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.

I was (ab)using the current slackness of BUILD_BUG_ON() to be a noop on
non-constants. We can replace with a BUG_ON if we fix BUILD_BUG_ON() to
insist on a compile-time constant; I think that's still an overall win.


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