Skip to content

Commit 7d10f3b

Browse files
committed
Merge #65: Fix clang "unknown warning group" errors
680776f Fix clang "unknown warning group" errors (Russell Yanofsky) Pull request description: Use clang __has_warning macro to avoid `unknown warning group '-Wsuggest-override'` warning in older versions of clang that have the `__has_warning` macro but don't have the `suggest-override` warning. Errors were showing up https://github.com/bitcoin/bitcoin/pull/10102/checks?check_run_id=4671391974 / https://cirrus-ci.com/task/4642955743985664 Top commit has no ACKs. Tree-SHA512: 8f15376f7ec054640c417174f260f21b7406a73d0c9ebf60a17a3a5bb497cf7baeab1335ec66d8e41117460b6b5ab872ec8c00a9afb63c98602031b95230194f
2 parents bc6624a + 680776f commit 7d10f3b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mp/gen.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ void Generate(kj::StringPtr src_prefix,
213213
h << "#include <" << PROXY_DECL << ">\n\n";
214214
h << "#if defined(__GNUC__)\n";
215215
h << "#pragma GCC diagnostic push\n";
216+
h << "#if !defined(__has_warning)\n";
216217
h << "#pragma GCC diagnostic ignored \"-Wsuggest-override\"\n";
218+
h << "#elif __has_warning(\"-Wsuggest-override\")\n";
219+
h << "#pragma GCC diagnostic ignored \"-Wsuggest-override\"\n";
220+
h << "#endif\n";
217221
h << "#endif\n";
218222
h << "namespace mp {\n";
219223

0 commit comments

Comments
 (0)