Problem 1093

Summary: G4GDML classes without virtual destructor
Product: Geant4 Reporter: Pere Mato <pere.mato>
Component: persistency/gdmlAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED WORKSFORME    
Severity: minor    
Priority: P5    
Version: 9.2   
Hardware: Other   
OS: Linux   

Description Pere Mato 2009-11-27 18:23:10 CET
I am getting the following warnings using gcc 3.4.4 complaining about a non-virtual destructor.

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadDefine.hh:43,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadMaterials.hh:50,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadSolids.hh:78,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadSetup.hh:48,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadParamvol.hh:50,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadStructure.hh:59,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:44,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLRead.hh:91: 
warning: `class G4GDMLRead' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadMaterials.hh:50,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadSolids.hh:78,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadSetup.hh:48,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadParamvol.hh:50,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadStructure.hh:59,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:44,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadDefine.hh:66: 
warning: `class G4GDMLReadDefine' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadSolids.hh:78,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadSetup.hh:48,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadParamvol.hh:50,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadStructure.hh:59,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:44,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadMaterials.hh:53: 
warning: `class G4GDMLReadMate rials' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadSetup.hh:48,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadParamvol.hh:50,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadStructure.hh:59,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:44,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadSolids.hh:81: 
warning: `class G4GDMLReadSolids' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadParamvol.hh:50,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadStructure.hh:59,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:44,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadSetup.hh:51: 
warning: `class G4GDMLReadSetup' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadStructure.hh:59,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:44,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadParamvol.hh:53: 
warning: `class G4GDMLReadParamvol' has virtual functions but non-virtual destructor

In file included from 
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:44,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLReadStructure.hh:71: 
warning: `class G4GDMLReadStru cture' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteDefine.hh:44,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteMaterials.hh:48,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteSolids.hh:73,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteSetup.hh:44,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteParamvol.hh:47,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteStructure.hh:53,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:45,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWrite.hh:57: 
warning: `class G4GDMLWrite' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteMaterials.hh:48,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteSolids.hh:73,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteSetup.hh:44,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteParamvol.hh:47,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteStructure.hh:53,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:45,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteDefine.hh:48: 
warning: `class G4GDMLWriteDefine' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteSolids.hh:73,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteSetup.hh:44,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteParamvol.hh:47,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteStructure.hh:53,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:45,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteMaterials.hh:51: 
warning: `class G4GDMLWriteMaterials' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteSetup.hh:44,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteParamvol.hh:47,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteStructure.hh:53,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:45,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteSolids.hh:76: 
warning: `class G4GDMLWriteSolids' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteParamvol.hh:47,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteStructure.hh:53,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:45,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteSetup.hh:47: 
warning: `class G4GDMLWriteSetup' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteStructure.hh:53,                 
from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:45,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteParamvol.hh:50: 
warning: `class G4GDMLWritePar amvol' has virtual functions but non-virtual destructor

In file included from /opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLParser.hh:45,
                 from Mokka.cc:20:
/opt/lcd/software/slc4_ia32_gcc34/geant4/9.2/include/G4GDMLWriteStructure.hh:56: 
warning: `class G4GDMLWriteStructure' has virtual functions but non-virtual destructor
Comment 1 Gabriele Cosmo 2009-11-27 22:23:43 CET
The problem is already fixed in release 9.2.p02.
Please, apply patch-02 to your 9.2 installation!