[Prev][Next][Index]

pC++2dep can't parse dummy class



Hi,

I have found another bug of pC++2dep: it cannot generate a parse tree
(.dep) if my file contains a dummy derived class. By dummy derived
class, I mean a subclass with no additional variables or methods.

I have enclosed a sample file, and the result of applying pC++2dep is:
  whui:~/sage_new/test/tmp> pC++2dep person.cc
  Error on line 24 of person.cc:  error in the -> expression; either
  right-hand-side is not a member or left-hand-side of -> is incorrect

Here is my person.cc file (note: if I uncomment the line "int employeeID;",
pC++2dep will compile):
//---- begin --------------------------------------------------
#include <stdio.h>
#include <string.h>

class Person
{
  public:
   char		name[50];
   void		setName(char *s) { strcpy(name, s); };
};

class Employee : public Person
{
  public:
//    int		employeeID;
};


/* MAIN PROGRAM */
int	main(int argc, char **argv)
{
  Employee	*emily;

  emily = new Employee();
  emily->setName("Emily");
  printf("emily->name: %s\n", emily->name);
  delete emily;
};
//----  end  --------------------------------------------------

Thanks,

Will