lkml.org 
[lkml]   [2000]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    In article <20000906115105.B20244@pcep-jamie.cern.ch>,
    Jamie Lokier <lk@tantalophile.demon.co.uk> wrote:
    >Linus Torvalds wrote:
    >> And I'm saying that if people really want to do this, then use the
    >> computer to do it for you, having more than just "grep", and making your
    >> tools aware of it.
    >
    >I'd just like to add, for the benefit of onlookers, that this is
    >quite easy.
    >
    >Temporarily change name of `count' in struct page in your private tree;
    >recompile. Voila! Every occurence of page->count will show as a
    >compile error, with line number.

    Yes. This is, in fact, how a lot of these things have been done. Often
    the name-change isn't even just temporary - it stays, because that way
    nobody will be able to compile old code that depends on old conventions
    even by mistake.

    However, what I think Al Viro dislikes about this is that it does tend
    to leave code that won't compile, just because some of the accesses are
    in places that the compiler doesn't see due to the pre-processor (or due
    to other build-rules: like in architectures that aren't the one that the
    developer uses).

    That said, it works. This is also the reason why I want the kernel to
    use as tight type-checking as C allows: because it again allows people
    to change things _without_ having to be perfectly aware of every single
    detail that depends on the old calling sequences, as the compiler will
    warn if the types are mis-used.

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

    \
     
     \ /
      Last update: 2005-03-22 12:38    [W:8.847 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site