Public bug reported:

Binary package hint: pmccabe

the current version of pmccabe (2.6) has several bugs:
-compiler directives are ignored completely, resulting in parsing/reporting 
errors on code like this:
#if 0
void f() {
#endif
int g() {

-incorrect parsing of throw(), compiler attribute, and volatile keyword 
annotations on functions/methods:
class X {
  void f() const throw() volatile __attribute__(...);
}

-incorrect parsing of multi-line macros where \n comes before \\:
#define con("%x %x\n", 
\
        0x0)

void foo() {}

-various hangs, bits of memory corruption, etc on valid code

I have fixed all of these issues, and new ones that came up, and have
included them in the attached patch. I added new tests to the testsuite
for every bug I fixed. I tested on the gcc, scummvm, amop, cgreen,
mockitopp, pmccabe, and proprietary C++ sources and verified the top and
bottom 10 functions by complexity were correct. I ran the same tests
under valgrind, and fixed some minor issues until it was also clean. I
cleaned up all but one compiler warning (that appears to be a false
positive). Formatting using spaces/tabs was inconsistent within and
across files, so I let Eclipse CDT reformat in the BSD/Allman style in
order to inject consistency in the modified files.

There are known issues that remain, documented in the TODO file, but
none of them yielded dramatically incorrect results in the code bases I
tested on.

I also modified the Makefile to use the "mega-compilation" technique
(via a new file called combined.c, which allows for effective use of -O3
and -fwhole-program. This resulted in an 80% speed increase in my tests.

** Affects: pmccabe (Ubuntu)
     Importance: Undecided
         Status: New

-- 
incorrect parsing/processing of several C/C++ features
https://bugs.launchpad.net/bugs/659550
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to