mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Issue #2749 - Part 8 - Put mfbt/casting.h pragmas behind GCC conditional.
This commit is contained in:
parent
fc9643a1a7
commit
497b6d5854
1 changed files with 6 additions and 0 deletions
|
|
@ -75,10 +75,13 @@ constexpr uint64_t safe_integer_unsigned() {
|
|||
return std::pow(2, std::numeric_limits<T>::digits);
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
// This is working around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81676,
|
||||
// fixed in gcc-10
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#endif
|
||||
|
||||
template <typename In, typename Out>
|
||||
bool IsInBounds(In aIn) {
|
||||
constexpr bool inSigned = std::is_signed_v<In>;
|
||||
|
|
@ -161,7 +164,10 @@ bool IsInBounds(In aIn) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue