Subject: Re: Bug in g++?
To: None <e.p.boven@student.utwente.nl>
From: David Gilbert <dgilbert@jaywon.pci.on.ca>
List: port-sparc
Date: 12/25/1996 11:19:27
>>>>> "Paul" == Paul Boven <e.p.boven@student.utwente.nl> writes:

Paul> Hi everyone, Yes, I am *still* trying to build octave for the
Paul> Sparc-NetBSD.  It compiles with hardly a problem, but the linker
Paul> doesn't like things at all. This weekend I have access to an
Paul> intel-machine running NetBSD-1.2, just like I do. Although t
Paul> doesn't have swapspace and diskspace enough on it to finish
Paul> things, I have been able to compare object-files.  I don't know
Paul> alas if this NetBSD-version would yield better results because
Paul> of these differences.

	I've just gotten through build Hylafax-4p1, and it was quite a
dredful experience.  Firstly, there were a number of places where the
right include files or symbols were not defined for NetBSD (I will be
back-submitting all that stuff), but one thing that I can't pawn off
on them is the ___pure_virutal problem.

	At the end of this message is a chunk of C++ code that when
compiled (gcc -o pure pure.c++) will come up with a symbol that is not
defined '___pure_virtual' with the stock NetBSD compiler.  I'm using a
late 1.1-current here.

	Now... I also have my own install of GCC (because I want to
play with fcc et. al.) and when I compile the same code with it,
everything works as expected.

Dave.

--begin pure.c++--
#include <stdio.h>
#include <stdlib.h>

class parent
{
  protected:
    int i1,i2;
  public:
    virtual void doit(int, int) = 0;
};

class child : public parent
{
  public:
    virtual void doit(int, int);
};

void child::doit(int a, int b)
{
    i1 = a;
    i2 = b;
}

main()
{
    child foo;
    parent *bar = &foo;
    
    bar->doit(4,3);
}
--end pure.c++--

-- 
============================================================================
|David Gilbert, PCI, Richmond Hill, Ontario.  | Two things can only be     |
|Mail:      dgilbert@jaywon.pci.on.ca         |  equal if and only if they |
|http://www.pci.on.ca/~dgilbert               |   are precisely opposite.  |
=========================================================GLO================