未验证 提交 f5689178 编写于 作者: T tiancaishaonvjituizi 提交者: GitHub

fix false positive warning of gcc>=9 (#42265)

* fix false positive warning in gcc>=9

* use more aggressive way

* Add comments
上级 94acf7c8
......@@ -13,6 +13,15 @@
#pragma once
// gcc >= 9 has a bug that creates a false positive warning.
// Reference:
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92145
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89381
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 9
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
/*
variant synopsis
......@@ -2828,3 +2837,7 @@ struct hash<paddle::monostate> {
};
} // namespace std
#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 9
#pragma GCC diagnostic pop
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册