Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for -mbig-obj and ref qualifier check #1929

Merged
merged 5 commits into from
Oct 11, 2020
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
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ if (HAVE_STRTOD_L)
endif ()

if (MINGW)
target_compile_options(fmt PUBLIC "-Wa,-mbig-obj")
check_cxx_compiler_flag("Wa,-mbig-obj" FMT_HAS_MBIG_OBJ)
if (${FMT_HAS_MBIG_OBJ})
target_compile_options(fmt PUBLIC "-Wa,-mbig-obj")
endif()
endif ()

if (FMT_WERROR)
Expand Down
4 changes: 2 additions & 2 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ struct FMT_EXTERN_TEMPLATE_API uint128_wrapper {
uint64_t high() const FMT_NOEXCEPT { return uint64_t(internal_ >> 64); }
uint64_t low() const FMT_NOEXCEPT { return uint64_t(internal_); }

uint128_wrapper& operator+=(uint64_t n) & FMT_NOEXCEPT {
uint128_wrapper& operator+=(uint64_t n) FMT_NOEXCEPT {
internal_ += n;
return *this;
}
Expand All @@ -842,7 +842,7 @@ struct FMT_EXTERN_TEMPLATE_API uint128_wrapper {
uint64_t high() const FMT_NOEXCEPT { return high_; }
uint64_t low() const FMT_NOEXCEPT { return low_; }

uint128_wrapper& operator+=(uint64_t n) & FMT_NOEXCEPT {
uint128_wrapper& operator+=(uint64_t n) FMT_NOEXCEPT {
# if defined(_MSC_VER) && defined(_M_X64)
unsigned char carry = _addcarry_u64(0, low_, n, &low_);
_addcarry_u64(carry, high_, 0, &high_);
Expand Down