On 11/7/11, Matt Beaumont-Gay <[email protected]> wrote: > On Mon, Nov 7, 2011 at 10:33, Matt Beaumont-Gay <[email protected]> > wrote: >> Thanks, r143972. > > Reverted in r144058 -- I assumed incorrectly that -Wnon-virtual-dtor > was in -Wall, so I didn't notice that after adding the protected dtor > to the base class, -Wnon-virtual-dtor still fired on the subclass. > > I don't have any real investment in this issue, as long as > -Wnon-virtual-dtor stays quiet, so go ahead and adjust both classes to > your liking at your leisure :)
Oh, I see. I'll take a look when I get to my desk. Thanks for the details >> >> On Mon, Nov 7, 2011 at 10:14, David Blaikie <[email protected]> wrote: >>>> Appease -Wnon-virtual-dtor >>> >>>> + virtual ~PseudoOpBuilder() {} >>>> + >>> >>> It looks like the right thing to do is to make the dtor protected and >>> non-virtual (this should still silence the warning), as no users >>> actually try to destroy these objects polymorphically. ( >>> http://www.gotw.ca/publications/mill18.htm ) >>> >>> - David >>> >> > -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d+@ s++: a-- C++++ ULS++ P L++ !E W++ N+ o? K? w(+) O? M@ V? PS+ PE@ Y+ PGP- t(+) 5 X+ R tv+ b+ DI++ D++ G+ e++ h- r y? ------END GEEK CODE BLOCK------ _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
