[Prev][Next][Index]

pc++ bugs on SGI iris4d



Hi,

I am able to compile the enclosed code with g++ (g++ main_all.cc),
but when I use pc++ (pc++ -v main_all.cc), it complains the following:
No additional include paths found in enviroment...
EXECUTING: DCC -E
-I/usr/sherwoodpk1/ugrad/burch/compiler/pc++sage++-1.7/target/uniproc/include
-I/usr/sherwoodpk1/ugrad/burch/compiler/pc++sage++-1.7/target/include
-D__PCXX__ TEMP_pC++.pc.C > TEMP_pC++.C 
EXECUTING: /bin/rm -f TEMP_pC++.pc.C
EXECUTING: pC++2dep -verbose  TEMP_pC++.C
Warning on line 541 of /usr/include/CC/iostream.h:  sputc :possible
member function arg type missmatch
Warning on line 646 of /usr/include/CC/iostream.h:  non-standard friend
class-name; keword class required
pC++2dep: Writing Parse Tree (.dep) File: TEMP_pC++.dep
EXECUTING: mv TEMP_pC++.dep main_all.dep
EXECUTING: dep2C++ -arch uniproc -o main_all.C main_all.dep

The two warnings are the killers, and they are about #include.

Do you have any patches?

Will

---- c u t   h e r e --------------------------------------------------
//  JUST a testing program - main_all.cc
#include <iostream.h>
#include <string.h>

#define MAX_NAME_SIZE   100


class Person
{
  public:
    int		 sin;
    char	*name;

    Person(char *);
    ~Person();
    int		 getSIN();
    void	 setSIN(int);
    char	*getName();
    void	 setName(char *);
    void	 say(char *);
};


Person::Person(char *aName)
{
   sin = 123456789;  // assign arbitrary SIN; should use class var.
   name = new char [MAX_NAME_SIZE];
   strcpy(name, aName);
};

Person::~Person()
{
  delete name;
};

int	 Person::getSIN()		{ return(sin); };
void	 Person::setSIN(int i)		{ sin = i; };
char	*Person::getName()		{ return(name); };
void	 Person::setName(char *s)	{ strcpy(name, s); };
void	 Person::say(char *s)
{
  cout << endl;
  cout << this->getName() << " says: " << endl;
  cout << "  \"" << s << "\"" << endl;
};


// ############## MAIN ###############
void	main(int argc, char **argv)
{
  Person	*will;

  will = new Person("Will Hui");
  will->say("Hello World!");
  delete will;
};