PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3028 *** shadow/3028 Tue Aug 7 14:13:08 2001 --- shadow/3028.tmp.26008 Tue Aug 7 14:13:08 2001 *************** *** 0 **** --- 1,77 ---- + +============================================================================+ + | Class has virtual functions but non-virtual destructor | + +----------------------------------------------------------------------------+ + | Bug #: 3028 Product: Xerces-C++ | + | Status: NEW Version: 1.5.1 | + | Resolution: Platform: Sun | + | Severity: Normal OS/Version: Solaris | + | Priority: Other Component: Utilities | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + I compile code using Xerces-C++, using g++ 2.95.2 with the -Wall compiler option + (turn on all significant warnings). + + If I include the header file <sax2/XMLReaderFactory.hpp>, I always get lots of + warnings about classes with virtual functions but non-virtual destructors. + + This is because the template classes RefHash2KeysTableOfEnumerator and + RefHash3KeysIdPoolEnumerator derive from XMLEnumerator, which has virtual + functions. However, these two classes' destructors are not virtual. + + Making sure that all classes that derive from XMLEnumerator have virtual + destructors should solve the problem. + + This problem did not arise with Xerces-C++ 1.4. I believe it was introduced + with Schemas. + + Here, specifically, are the compiler messages. dummy.cpp consists only + of the line + #include <sax2/XMLReaderFactory.hpp> + + $ g++-2.95.2 -Wall + -I/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include -c -o + dummy.o dummy.cpp + In file included from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/validators/schema/SchemaElementDecl.hpp:91, + from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/validators/schema/SchemaValidator.hpp:92, + from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/internal/XMLScanner.hpp:177, + from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/internal/VecAttributesImpl.hpp:86, + from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/parsers/SAX2XMLReaderImpl.hpp:118, + from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/sax2/XMLReaderFactory.hpp:76, + from dummy.cpp:1: + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/util/RefHash2KeysTableOf.hpp: + In instantiation of `RefHash2KeysTableOfEnumerator<SchemaAttDef>': + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/validators/schema/ComplexTypeInfo.hpp:364: + + instantiated from here + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/util/RefHash2KeysTableOf.hpp:249: + warning: `class RefHash2KeysTableOfEnumerator<SchemaAttDef>' has virtual + functions but non-virtual destructor + In file included from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/validators/schema/SchemaValidator.hpp:93, + from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/internal/XMLScanner.hpp:177, + from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/internal/VecAttributesImpl.hpp:86, + from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/parsers/SAX2XMLReaderImpl.hpp:118, + from + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/sax2/XMLReaderFactory.hpp:76, + from dummy.cpp:1: + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/util/RefHash3KeysIdPool.hpp: + In instantiation of `RefHash3KeysIdPoolEnumerator<SchemaElementDecl>': + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/validators/schema/SchemaGrammar.hpp:266: + + instantiated from here + +/home/lennox/Proj/Xerces-C/xerces-c-src1_5_1/Solaris-8-gcc295/include/util/RefHash3KeysIdPool.hpp:282: + warning: `class RefHash3KeysIdPoolEnumerator<SchemaElementDecl>' has virtual + functions but non-virtual destructor \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
