vaughan%cadillac.cad.mcc.com@MCC.COM (Paul Vaughan) (01/13/90)
The following source causes the compiler to SegV. Quite a few modifications will make the compiler execute without fault. Most notably, removing "virtual" from the Object destructor declaration (immediately below) solves the problem. class Class; class Object { protected: Object() {} public: virtual ~Object() {} }; class NamedObject: public Object { public: NamedObject(const char* n = 0 ); ~NamedObject(); }; class NameSpaceTable; class Entity: public NamedObject { public: Entity(const char* n=0 ,Entity* o=0 ,NameSpaceTable* nspace=0 , int namespaceSize = 100); ~Entity(); }; class Behavior : public Entity { public: Behavior(const char* = 0 , Entity* = 0 , NameSpaceTable* = 0 , int = 0); virtual ~Behavior(); }; class AttributeBehavior : public Behavior { public: AttributeBehavior(const char* = 0 , Entity* = 0 , NameSpaceTable* = 0 , int = 0); ~AttributeBehavior(); virtual const char* GetName(); virtual char* GetValueString(); virtual int SetValueString(const char*); void SetIattString(const char*); }; class Attribute : public Entity { public: Attribute(const char* n=0 ,Entity* o=0 ,NameSpaceTable* nspace=0 ); ~Attribute(); }; class IntegerAt : public Attribute { public: IntegerAt(const char* n=0 ,Entity* o=0 ,NameSpaceTable* nspace=0 ); ~IntegerAt(); }; class InterAtt : public AttributeBehavior { public: ~InterAtt(); }; class IgIntAtt : public InterAtt, public IntegerAt { public: IgIntAtt(char*, Entity*); ~IgIntAtt(); Attribute* GetAttribute(); void HandleClick(unsigned char); int SetValueString(const char*); }; // line 68 [2.341]puma) g++-1.36.2.z -v vdh.cc g++ version 1.36.2 (based on GCC 1.36) /usr/local/gnu/1.36.2/zlib/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 vdh.cc /usr/tmp/cca07116.cpp GNU CPP version 1.36 /usr/local/gnu/1.36.2/zlib/gcc-cc1plus /usr/tmp/cca07116.cpp -quiet -dumpbase vdh.cc -version -o /usr/tmp/cca07116.s GNU C++ version 1.36.2 (based on GCC 1.36) (68k, MIT syntax) compiled by GNU C version 1.36. default target switches: -m68020 -mc68020 -m68881 -mbitfield vdh.cc:68: Segmentation violation g++-1.36.2.z: Program cc1plus got fatal signal 11.