DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6910>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6910 illegal attempt to delete void* in src/util/RefHashTableOf.c Summary: illegal attempt to delete void* in src/util/RefHashTableOf.c Product: Xerces-C++ Version: 1.6.0 Platform: HP OS/Version: Other Status: NEW Severity: Blocker Priority: Other Component: Build AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] *** PROBLEM The compiler barfs at attempts to delete void* in RefHashTableOf.c. The problem lines are 205, 257, and 346. The problem is exhibited when these templates are instantiated with TVal=void, e.g. in DocumentImpl.cpp, DocumentImpl::setUserData (). Deleting a void* is explicitly forbidden by the ASNCI C++ standard, section 5.3.5, para 5, note 73. *** SOLUTION I have implemented a local solution as follows: 1. Change the code at lines 205, 257, and 346 mentioned above, which are all of the form "delete XXX;", to "DeleteIfNotVoid(XXX);". 2. Insert the following above line 187 in RefHashTableOf.c: template <class T> inline void DeleteIfNotVoid(T* t) { delete t; } template <> inline void DeleteIfNotVoid<void>(void*) { } The above template and its void specialization will ensure that we do not attempt to delete objects of type void. *** ENVIRONMENT I am building on HP-UX 10.20 (uname -a = "HP-UX hibds012 B.10.20 A 9000/821 2013082413 two-user license"). I am using aCC version "HP ANSI C++ B3910B A.01.21". My parameters to runConfigure were "-php-10 -ccc -xaCC -minmem -nfileonly - tnative -rpthread -z'+p -z -D_REENTRANT'" *** EXAMPLE Here is an example of the build failure: % gmake mkdir -p /tmp/x/include/dom cp -fp DOM.hpp DOMString.hpp DOM_Attr.hpp DOM_CDATASection.hpp DOM_CharacterData.hpp DOM_Comment.hpp DOM_DOMException.hpp DOM_DOMImplementation.hpp DOM_Document.hpp DOM_DocumentFragment.hpp DOM_DocumentType.hpp DOM_Element.hpp DOM_Entity.hpp DOM_EntityReference.hpp DomMemDebug.hpp DOM_NamedNodeMap.hpp DOM_Node.hpp DOM_NodeFilter.hpp DOM_NodeIterator.hpp DOM_NodeList.hpp DOM_Notation.hpp DOM_ProcessingInstruction.hpp DOM_Range.hpp DOM_RangeException.hpp DOM_Text.hpp DOM_TreeWalker.hpp DOM_XMLDecl.hpp /tmp/x/include/dom aCC -D_HP_UX -DHPaCC -DHPUX10 +DAportable +Z -c +p -D_REENTRANT -O - DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_DCE - I/tmp/x/include -o /tmp/x/obj/HPUX/DocumentImpl.o DocumentImpl.cpp Error 251: "/tmp/x/include/util/RefHashTableOf.c", line 205 # An object cannot be deleted using a pointer of type 'void *' since the type of the object allocated is unknown. Either delete the object using the allocated type or call operator delete directly. delete curElem->fData; ^^^^^^^^^^^^^^ Error 556: "/tmp/x/include/util/RefHashTableOf.c", line 150 # Unable to generate specialization "void RefHashTableOf<void>::removeAll()" due to errors during generation. removeAll(); ^^^^^^^^^^^ gmake: *** [DocumentImpl.o] Error 2 *** THE END Kind Regards, --MikeL --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
