Re: Linux 2.6.0-test6

From: Tim Schmielau
Date: Sun Sep 28 2003 - 16:44:33 EST


> Ok, how about this:
>
> for each header file {
> make header.o
> 1) if it doesn't build {
> print out a warning
> continue
> }
> for each #include line {
> remove the #include line
> make header.o
> 2) if it build {
> print out a warning
> }
> 3) if there are less than x gcc warnings {
> print out a warning
> }
> }
> }
>
> 1) is my old proposal. 2) is the natural counterpart. 3) could be
> what you want. If some header is only needed for something like your
> example, we may be able to catch it this way.
>
> Would this work? Would something else work even better?


Problem is, this depends too much on the specific configuration, and thus
will never be a general solution (will generate false positives and false
negatives). Might be a good start, though.

Tim


P.S.: My secret plan is to write a parser or hack sparse to do this for
both #if and #else branches of conditionals at the same time. This
however, is a big project, and I don't think of even _starting_ this
before next year.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/