Skip to content

Commit

Permalink
#2268: ignore invalid maybe-uninitialized warning
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Nov 15, 2024
1 parent 6b623be commit 1dcc8c0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/vt/collective/reduce/scoping/strong_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,17 @@ struct TagPair {
}

TagType first() const { return t1_; }
TagType second() const { return t2_; }
TagType second() const {
#pragma GCC diagnostic push
#if defined(__has_warning)
#if __has_warning("-Wmaybe-uninitialized")
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
// ignore gcc-13 false positive
return t2_;
#pragma GCC diagnostic pop
}

private:
TagType t1_ = no_tag;
Expand Down

0 comments on commit 1dcc8c0

Please sign in to comment.