[clug] Code "rework/rewrite" tools.

Daniel Pittman daniel at rimspace.net
Wed Jan 21 03:33:30 GMT 2009


Andrew Janke <a.janke at gmail.com> writes:

>> I never found anything better than a binary search with #if 0 or
>> comments; remove the entire body of the code, and then comment back in
>> what the compiler complains is missing.  Repeat until you identify what
>> is needed.
>
> Fiddlesticks.
>
> Mind you this looks promising, pity it doesn't like the old crufty C++
> code I am dealing with.  http://code.google.com/p/cppclean/

...and now you see why I never found anything better. ;)

I really like the idea of an automated tool, but all the C++ code I have
worked in has ended up too crufty, one way or another, for them to
succeed.

For better or worse, the use of complex CPP macros, obscure template
code[1] or the inability to map a line of code back to where it was
created always ended up messing me around.

So, yeah, the manual process works.  At least it generally doesn't take
*too* long, since a less-than-awful compiler should start reporting
multiple missing definitions each run, after the first couple of passes.

Regards,
        Daniel

Footnotes: 
[1]  ...or, god help us all, "serious" template metaprogramming.



More information about the linux mailing list