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.
This commit is contained in:
Alexandre Duret-Lutz 2022-07-05 10:38:51 +02:00
parent 1fc94ee6f2
commit 833fcdebc1

View file

@ -22,6 +22,13 @@ AC_DEFUN([CF_GXX_WARNINGS],
#line __oline__ "configure"
#include <string>
#include <regex>
// 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