Article View: gnu.g++.bug
Article #797Re: Miscompiled vtbl
From: A.R.Runnalls
Date: Fri, 14 Aug 1992 08:06
Date: Fri, 14 Aug 1992 08:06
11 lines
1132 bytes
1132 bytes
In article <5@larch.ukc.ac.uk> arr@ukc.ac.UK I (A.R.Runnalls) wrote >The following program gives the output `I'm an LR' instead of the >correct output `I'm an LR2'. The problem, which appears to be due to >the virtual table for LR2 being wrongly set up, disappears if either the >virtual destructor for class L is removed, or if a virtual destructor is >added to class R. Whilst these observations about virtual destructors were true for the example program posted, inserting a virtual destructor for (the analogue of) class R failed to cure the problem in the original program from which the example was distilled.
Technical Details
Message-ID:
<6@larch.ukc.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!mips!mips!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ukc.ac.UK!arrReferences:
<5@larch.ukc.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!mips!mips!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ukc.ac.UK!arr From: arr@ukc.ac.UK (A.R.Runnalls) Newsgroups: gnu.g++.bug Subject: Re: Miscompiled vtbl Message-ID: <6@larch.ukc.ac.uk> Date: 14 Aug 92 08:06:18 GMT References: <5@larch.ukc.ac.uk> Sender: gnulists@ai.mit.edu Reply-To: arr@ukc.ac.uk (A.R.Runnalls) Distribution: gnu Organization: Computing Lab, University of Kent at Canterbury, UK. Lines: 11 Approved: bug-g++@prep.ai.mit.edu