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

* Boaz Harrosh <bharrosh@panasas.com> wrote:

> Ingo Molnar wrote:
> > * Boaz Harrosh <bharrosh@panasas.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.
> >
>
> The use of __builtin_constant_p in inline functions is broken. This is
> because it will give different results depending on the -O level used.
> So I think that using it in the Kernel with inlines is plain broken.
> And should be discouraged.

ok - that's convincing, so your approach is superior to my hack on
multiple levels.

Could you please (re-)send your patch(es) with a changelog, etc., so
that i can apply it and drop my patches?

Thanks,

Ingo


\
 
 \ /
  Last update: 2008-08-21 14:21    [W:0.049 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site