https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116449

--- Comment #11 from Franz Sirl <sirl at gcc dot gnu.org> ---
The fix works nicely here, thanks!

As a fun fact, we gain a warning for this likely undefined code:

```
class BaseC {
public:
        virtual ~BaseC() {}
};

class C : public BaseC {
public:
        virtual ~C() override;
};

C::~C()
{
        BaseC::~BaseC();
}
```
```
g++-14 -O2 -W -Wall test-manual-destructor.cpp -fsanitize=undefined  -c
test-manual-destructor.cpp: In destructor 'C::~C()':
test-manual-destructor.cpp:15:1: warning: '*(BaseC*)this.BaseC::_vptr.BaseC' is
used uninitialized [-Wuninitialized]
   15 | }
      | ^

```

It's nice there is some warning for this coding error, but the text could nicer
:-)

Reply via email to