On Fri, 2 Feb 2007, Pavel Roskin wrote:
>
> I think sparse should distinguish between safe and unsafe preprocessor
> operations on undefined symbols.
It does.
Try this:
#define NECESSARY 1
#if NECESSARY || UNNECESSARY
#endif
and notice how sparse does NOT warn about UNNECESSARY not being defined.
Because it doesn't matter.
> For instance, "#if SYMBOL" has a very specific meaning
No.
#if SYMBOL
has a very specific *problem* - it very possibly is a typo.
So this is a warning I absolutely *want* for the kernel. If some other
projects don't want it, fine, but it should be on by default as a warnign
for potentially dangerous use of preprocessor symbols.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html