On 04/26/2012 08:03 AM, Lauri Kasanen wrote:
> Hi
> 
> Linus asked for a better way to handle the kconfig values:
> https://plus.google.com/102150693225130002912/posts/9gntjh57dXt
> 
> The solution is rather neat, maybe it could save generating a few
> thousand included lines in busybox too:
> 
> #define is_set(macro) is_set_(macro)
> #define macrotest_1 ,
> #define is_set_(value) is_set__(macrotest_##value)
> #define is_set__(comma) is_set___(comma 1, 0)
> #define is_set___(_, v, ...) v

It's clever, but there's a problem:

Right now, if you leave in a test for a symbol that's been removed, or
if you typo a symbol name, the build will break. And this is good, it
shows you what needs fixing.

With this new mechanism, testing for a symbol that _can't_ ever be set
means there's dead code in the source which the compiler won't warn you
about.

*shrug*  Maybe it's still worth doing, not my call...

Rob
-- 
GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code.
Either it's "mere aggregation", or a license violation.  Pick one.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to