File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,10 @@ struct DetachedTasksSyncBlock::Token final : public PolymorphicAwaiter {
4848// Token is non-standard-layout type, because it is a polymorphic class.
4949// GCC complains that compilers are not required to implement offsetof for such types.
5050// TODO Find some way to work around that, e.g. split Token into multiple types?
51- #if defined(__GNUC__) && !defined(__clang__)
51+ #if defined(__clang__)
52+ #pragma clang diagnostic push
53+ #pragma clang diagnostic ignored "-Winvalid-offsetof"
54+ #elif defined(__GNUC__)
5255#pragma GCC diagnostic push
5356#pragma GCC diagnostic ignored "-Winvalid-offsetof"
5457#endif
@@ -63,7 +66,9 @@ struct DetachedTasksSyncBlock::Impl final {
6366 std::atomic<TaskCancellationReason> cancel_new_tasks{TaskCancellationReason::kNone };
6467};
6568
66- #if defined(__GNUC__) && !defined(__clang__)
69+ #if defined(__clang__)
70+ #pragma clang diagnostic pop
71+ #elif defined(__GNUC__)
6772#pragma GCC diagnostic pop
6873#endif
6974
You can’t perform that action at this time.
0 commit comments