Re: [PATCH] BUILD_BUG_ON() should not use array type

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Beulich
Date: Sunday, August 31, 2008 - 11:56 pm

>> --- linux-2.6.27-rc5/include/linux/kernel.h	2008-08-21 14:37:35.000000000 +0200

Yes, its attempting to have the effect of that if() construct.


Admittedly I didn't like the name much either, but so I also didn't like
any other name I could think of. And really, I'd also favor removing
the one use site altogether (hence the comment about the construct
there not having any effect), but thought it'd be a step backward
documentation-wise.

So for re-submitting an adjusted patch I'd need to be clear about the
way to go...


I was under the (apparently wrong) impression that while plain 0 can be
used to initialize a pointer, an expression evaluating to zero would need
a cast. While that's not the case as I just checked, I'd still prefer keeping
the construct both for documentation purposes and because in the error
case without the case you'd not only get the intended error message,
but also an extra (and perhaps confusing) warning.

Jan

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] BUILD_BUG_ON() should not use array type, Jan Beulich, (Fri Aug 29, 4:46 am)
Re: [PATCH] BUILD_BUG_ON() should not use array type, Andrew Morton, (Fri Aug 29, 1:22 pm)
Re: [PATCH] BUILD_BUG_ON() should not use array type, Alexey Dobriyan, (Fri Aug 29, 4:38 pm)
Re: [PATCH] BUILD_BUG_ON() should not use array type, Jan Beulich, (Sun Aug 31, 11:56 pm)