[Pmccabe] new set of fixes for pmccabe
matt at use.net
Tue Oct 12 16:28:54 MDT 2010
On Thu, 12 Aug 2010, Alfonso Cepeda wrote:
> pmccabe 2.6, (now in debian unstable) has included your patch.
> Thanks for your help.
I have created a new bug and uploaded a 'patch':
I fixed several parsing issues, some of which were mentioned by the
pmccabe mailing list:
1. recognize throw(), volatile, compiler attribute, and other
function/method declaration keywords.
2. skip code in #else/#endif blocks
3. skip code in #if 0/false blocks
4. fix various hangs/incorrect parsing in really weird, but still
legitimate code (see added tests for details)
5. fix a few minor memory corruption issues (found by valgrind), some
latent and some introduced
6. sped up by 80% by using mega-compilation and whole-program optimization
7. improve diagnostic messages to reduce debugging time:
versus the improved
"expected ';' before EOF"
"expected ')' before end of line"
The primary issue that remains (and is documented in the TODO), but
doesn't adversely affect the results on the codebases I tested, is the
scenario where a #else block is for a #if 0 block, both blocks will be
skipped. Someone else can take up the mantle for that one :)
I added new tests to the testsuite for everything I fixed, and
successfully ran pmccabe against the sources for gcc, scummvm, mockitopp,
amop, pmccabe, and private projects with no hangs or valgrind-detectable
issues. I also manually verified that the top and bottom 10 functions by
complexity were reported accurately.
Please let me know what I need to do to get this commited to CVS and/or
integrated into the Debian/Ubuntu package.
tangled strands of DNA explain the way that I behave.
More information about the Pmccabe