[PATCH, PR7302] -Wnon-virtual-dtor should't complain of protected dtor.

Paweł Sikora pluto@agmk.net
Tue Mar 20 19:24:00 GMT 2007


Hi,

The -Wnon-virtual-dtor warns even when the destructor is protected
and the class has virtual members and no friends.
In that case, there's no way the destructor can be called incorrectly.

Attached patch fixes this long known bug.
Bootstrapped and tested on x86_64-gnu-linux w/o new failures.

Please apply for 4.2/4.3.

BR,
Paweł.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr7302.patch
Type: text/x-diff
Size: 1931 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070320/f28e48d7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Wnvdtor-2.C
Type: text/x-c++src
Size: 935 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070320/f28e48d7/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regression-results.diff
Type: text/x-diff
Size: 850 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070320/f28e48d7/attachment-0002.bin>


More information about the Gcc-patches mailing list