This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug in egcs with C++?


I'm getting an odd bug in egcs...  (2.92.21 but also .13)
and also .23...

gcc -O9 -fomit-frame-pointer -pipe -fexpensive-optimizations -fexceptions
-D__SMP__ -D_REENTRANT -I./h -DMANAGE_MEM -DNO_CHECK -Isrc
-I/usr/local/include -g -rdynamic  -o /root/apps/projects/bin/hive-3D
-L/root/apps/projects/lib  hive-3D.o
main.o grid.o cursor.o gears.o md2.o pcx.o fDes.o lisp.o lisp_io.o
lisp_tools.o
lisp_memory.o lisp_number.o lisp_read.o lisp_printing.o dispatch_table.o
font.o
textfont.o C++-test.o Double.o Integer.o Colour.o Dimension.o Point.o
Polygon.o
Rectangle.o AffineTransform.o Arc2D.o ArcIterator.o Area.o CubicCurve2D.o
CubicIterator.o Ellipse2D.o FlatteningPathIterator.o GeneralPath.o
GeneralPathIterator.o Line2D.o QuadCurve2D.o QuadIterator.o Rectangle2D.o
RectangularShape.o RoundRectangle2D.o EllipseIterator.o
RoundRectIterator.o  -lgc -lstdc++ -lm -lz -ljpeg -ldl -lpthread -lggi
-lGL
Ellipse2D.o: In function `Ellipse2D::getPathIterator(AffineTransform *)':
/root/apps/projects/hive-3D/src/geom/EllipseIterator.hpp:25: undefined
reference to `EllipseIterator virtual table'
RoundRectIterator.o: In function
`RoundRectIterator::RoundRectIterator(RoundRectangle2D *, AffineTransform
*)':
/root/apps/projects/hive-3D/src/RoundRectIterator.cc:69: undefined
reference to
`RoundRectIterator virtual table'
RoundRectIterator.o: In function
`RoundRectIterator::RoundRectIterator(RoundRectIterator *)':
/root/apps/projects/hive-3D/src/RoundRectIterator.cc:86: undefined
reference to
`RoundRectIterator virtual table'
collect2: ld returned 1 exit status

varying -any- of the commandline didn't affect anything - except that I do
use exceptions...

Here's the pertinant code:
("Object" is irrelevant, as is NoSuchElementException.  Tested with both
disabled, no change)
As you can see I'm kinda basing this on Java-1.2 sorta... it's designed to
talk to Java and provide an alternative interface...
Any ideas?

I can provide more info if need be...

Oh.
	linux-2.1.127	(can't downgrade due to requiring fbcon support)
	glibc-2.0.7
	Cyrix 200+, 40MB ram, ~6GB hd space split between 3 drives.
	68MB swap


/* PathIterator.hpp
 * ----------------
 */

#ifndef PathIterator_def
#define PathIterator_def

#include "Object.hpp"
#include "NoSuchElementException.hpp"

class PathIterator : public Object
  {
public:
  enum winding_rules
    {
    WIND_EVEN_ODD = 0,
    WIND_NON_ZERO = 1
    };

  enum segment_types
    {
    SEG_MOVETO  = 0,
    SEG_LINETO  = 1,
    SEG_QUADTO  = 2,
    SEG_CUBICTO = 3,
    SEG_CLOSE   = 4
    };

  virtual int getWindingRule() = 0;
  virtual bool isDone() = 0;
  virtual void next() = 0;
  virtual int currentSegment(float coords[],int lim)
	throw (NoSuchElementException) = 0;
  virtual int currentSegment(double coords[],int lim)
	throw (NoSuchElementException) = 0;

  virtual ~PathIterator() {};

protected:
  PathIterator() : Object() { };
  };

#endif

/* EllipseIterator.hpp
 * -------------------
 */

#ifndef EllipseIterator_def
#define EllipseIterator_def

#include "geom/PathIterator.hpp"
#include "geom/AffineTransform.hpp"
#include "geom/Ellipse2D.hpp"
#include "NoSuchElementException.hpp"

class EllipseIterator : public PathIterator
  {
private:
  double x, y, w, h;
  AffineTransform* affine;
  int index;

  EllipseIterator() : PathIterator() { };
public:

  EllipseIterator(Ellipse2D* e, AffineTransform* at)
    : PathIterator(),index(0)
    {
    x = e->getX();
    y = e->getY();
    w = e->getWidth();
    h = e->getHeight();
    affine = at;
    };

  ~EllipseIterator();
  int  getWindingRule();
  bool isDone();
  void next();
  int  currentSegment(float  coords[],int lim) throw (NoSuchElementException);
  int  currentSegment(double coords[],int lim) throw (NoSuchElementException);
  };

#endif


All functions above are defined externally.  If ya want 'em, I'll post
'em, but I don't really think it's a good idea...

I have not yet worked out any other conditions that cause this.

G'day, eh? :)
	- Teunis


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]