From 833fcdebc16551e515c3536440a2d81e787b604b Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 5 Jul 2022 10:38:51 +0200 Subject: [PATCH] work around GCC bug 106159 * m4/gccwarn.m4: Add an example of multiple inheritance of virtual classes to trigger to new -Woverloaded-virtual warning on the destructor. --- m4/gccwarn.m4 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/m4/gccwarn.m4 b/m4/gccwarn.m4 index dc6969add..13f770ccc 100644 --- a/m4/gccwarn.m4 +++ b/m4/gccwarn.m4 @@ -22,6 +22,13 @@ AC_DEFUN([CF_GXX_WARNINGS], #line __oline__ "configure" #include #include + +// From GCC bug 106159 +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106159 +struct left { virtual ~left() {} }; +struct right { virtual ~right() {} }; +struct both: public left, public right {}; + int main(int argc, char *argv[[]]) { // This string comparison is here to detect superfluous