Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/boost/int128/detail/int128_imp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3264,7 +3264,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator%(const int128_t lhs, const
}
#else

const auto is_neg{static_cast<bool>(lhs < 0)};
const auto is_neg{lhs < 0};

int128_t remainder {};

Expand Down
13 changes: 12 additions & 1 deletion include/boost/int128/detail/mini_from_chars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ BOOST_INT128_HOST_DEVICE constexpr int from_chars_integer_impl(const char* first
}

// Return the parsed value, adding the sign back if applicable
// If we have overflowed then we do not return the result
// If we have overflowed, then we do not return the result
if (overflowed)
{
return EDOM;
Expand All @@ -201,7 +201,18 @@ BOOST_INT128_HOST_DEVICE constexpr int from_chars_integer_impl(const char* first

// This value will be negative to differentiate from errno values
// since they are in the range of acceptable distances

// This cast is useless on 32-bit platforms
#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wuseless-cast"
#endif

return static_cast<int>(first - next);

#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic pop
#endif
}
} // namespace impl

Expand Down
Loading