diff --git a/src/mp/gen.cpp b/src/mp/gen.cpp index c78d6ffa..6c31310d 100644 --- a/src/mp/gen.cpp +++ b/src/mp/gen.cpp @@ -213,7 +213,11 @@ void Generate(kj::StringPtr src_prefix, h << "#include <" << PROXY_DECL << ">\n\n"; h << "#if defined(__GNUC__)\n"; h << "#pragma GCC diagnostic push\n"; + h << "#if !defined(__has_warning)\n"; h << "#pragma GCC diagnostic ignored \"-Wsuggest-override\"\n"; + h << "#elif __has_warning(\"-Wsuggest-override\")\n"; + h << "#pragma GCC diagnostic ignored \"-Wsuggest-override\"\n"; + h << "#endif\n"; h << "#endif\n"; h << "namespace mp {\n";