Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Re: EPICS 7.0.1-pre1 (non-virtual destructors)
From: Michael Davidsaver <mdavidsaver@gmail.com>
To: Dirk Zimoch <dirk.zimoch@psi.ch>, core-talk@aps.anl.gov
Date: Tue, 28 Nov 2017 09:55:14 -0600
Dirk,

I have to admit I'm having trouble keeping track of the various changes you're having to make.
Could you put these up on github?


On 11/28/2017 09:19 AM, Dirk Zimoch wrote:
> g++ version 4.1.2 complains about the following classes having virtual functions but non-virtual destructors:
> 
> ChannelProviderRegistry from modules/pvAccess/src/client/pv/pvAccess.h
> RefMonitor from modules/pvData/src/misc/pv/reftrack.h
> 
> The warnings are kind of annoying as they show up in every code that includes these two headers.
> 
> However newer gcc versions (4.4+) do not print this warning.
> 
> Giving the classes public virtual destructors fixes the warnings.

imo this is a clear bug.  All c++ classes with virtual methods needs a virtual dtor.
The trouble is that gcc silently does the right thing in most cases, and often doesn't always print a warning.


Michael

References:
EPICS 7.0.1-pre1 Andrew Johnson
Re: EPICS 7.0.1-pre1 Dirk Zimoch
Re: EPICS 7.0.1-pre1 (non-virtual destructors) Dirk Zimoch

Navigate by Date:
Prev: git question Dirk Zimoch
Next: EPICS 7.0.1-pre1 (dbJLinkInit: lexical error: invalid char in json text. ) on Fedora 26 Williams Jr., Ernest L.
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: Re: EPICS 7.0.1-pre1 (non-virtual destructors) Dirk Zimoch
Next: Re: EPICS 7.0.1-pre1 (epicsException.h) Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 28 Nov 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·