This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Is gcc allowed to eliminate writes in a destructor?
- From: Norbert Lange <lange at chello dot at>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 10 Jun 2015 13:47:03 +0200
- Subject: Re: Is gcc allowed to eliminate writes in a destructor?
- Authentication-results: sourceware.org; auth=none
- References: <CADYdroP2mCaE0Mrv7r4MGJLd7MPhjq-A3O+vOSqDz=vf021-yg at mail dot gmail dot com> <CAH6eHdR5GMHXs-5WYfSAV3cz=quhCq8wMvQxGdrmVn4CqyF1Jw at mail dot gmail dot com> <555C58BD dot 8030508 at cloudius-systems dot com> <CAH6eHdRjx_h7HpGNGGfQJ3qQu_Tehs=aLzp+ca1v-uNRbNjnpA at mail dot gmail dot com> <555CCB25 dot 3030300 at redhat dot com> <CADYdroMMEdML1dvvcUpJL3ajwYChxZ_JY083jeOA0uxs7Ov_iw at mail dot gmail dot com> <CAH6eHdQPFpyks=1H2_UOCxY8kzh8PmqJV8dRdkW5Z8AdbNvU-A at mail dot gmail dot com> <CADYdroNPL5xpA7x1F20Hk2RCXjnmUcRnSQw4SSAQ5JH=0B0FJg at mail dot gmail dot com> <CAH6eHdTrE=56DYDjxcnfy3gPt5BqGRC_f2cDoyvK5FEUiULyqQ at mail dot gmail dot com>
Thanks,
if you mean vtable gets altered you mean the pointer is directed to
another vtable?
I assume you are right on this simple example (the members of Derived
are placed after Base, allowing a single vtable pointer ),
but with multiple inheritance you will invariable need multiple vtables.