Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8017578

Hotspot compilation error with latest Studio compiler

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • hs25
    • hs25
    • hotspot
    • b41

        Sergey Sprogis reports:

        generated/adfiles/formssel.cpp source failed with the following message.

        line 3845: Error: Deleting an object of polymorphic type MatchNode which doesn't have a virtual destructor may be unsafe.

        Initially, I filed bug 16985917 under BugDB against C++, but Steve closed it with the resolution:

        ---------------------------------------------------------
        Not a compiler bug, but a problem in the user code. At the line in question,
        an object of type MatchNode is deleted, which is a polymorphic type not
        having a virtual destructor. Such code is dangerous, and the compiler now
        warns about it. The code is compiled with -errwarn, which converts warnings
        into errors.

        The source code should be fixed so that the base type, class Form, has a
        virtual destructor.

              drchase David Chase (Inactive)
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: