Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1380

Unneccessary definition of extra delete operator causes compiler error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 3.1.0
    • None
    • None
    • Solaris 2.8 with compiler SPARCompiler 4.2

    Description

      So anyway why do you need to define that extra delete operator?:

      //The Borland compiler is complaining about duplicate overloading of delete
      #if !defined(XML_BORLAND)
      /**

      • This method provides a matching delete for the placement new
        *
      • @param p The pointer to the allocated memory
      • @param memMgr An application's memory manager
        */
        void operator delete(void* p, MemoryManager* memMgr);
        #endif

      SPARCompiler 4.2 (as probably a few others) does not recognize that operator as valid and report an error.

      Please make appropriate macro declarations (not only for Borland as it is now) in platform specific files as well as conditional generation check in files:

      xerces-c-src_2_6_0/src/xercesc/util/XMemory.hpp
      xerces-c-src_2_6_0/src/xercesc/util/XMemory.cpp

      The check could be as follows:

      #if !defined(XML_BORLAND) && !defined(NO_DELETE_OVERLOAD)
      ...
      #endif

      FYI, the code compiles just fine without operator.

      Attachments

        Activity

          People

            amassari Alberto Massari
            macieks Maciek Samsel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: