From 2dcb3f09c009ed9de7f50b2490ca8061501fc019 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sat, 11 Apr 2020 12:41:56 -0400 Subject: [PATCH 1/3] Turn off 128-bit integer for Embarcadero C++ clang-based compilers. Update the test for 128-bit integers. --- include/boost/config/compiler/codegear.hpp | 6 ++++++ test/boost_has_int128.ipp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 6e348afc..c2ee6cd0 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -26,6 +26,12 @@ # define BOOST_NO_CXX11_THREAD_LOCAL # define BOOST_NO_CXX11_ATOMIC_SMART_PTR +// This bug has been reported to Embarcadero + +#if defined(BOOST_HAS_INT128) +#undef BOOST_HAS_INT128 +#endif + // 32 functions are missing from the current RTL in cwchar, so it really can not be used even if it exists # define BOOST_NO_CWCHAR diff --git a/test/boost_has_int128.ipp b/test/boost_has_int128.ipp index b7e10a40..c581acc6 100644 --- a/test/boost_has_int128.ipp +++ b/test/boost_has_int128.ipp @@ -63,6 +63,9 @@ int test() fputs("Incorrect computation result.", stderr); return 1; } + + my_uint128_t i(2), j(1), k; + k = i / j; return 0; } From 869cc06e30fe219764fa7df717f6b2b3501dbc80 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sat, 11 Apr 2020 15:00:14 -0400 Subject: [PATCH 2/3] Turned off 128 bit float for Embarcadero and updated 128 float test. --- include/boost/config/compiler/codegear.hpp | 3 +++ test/boost_has_float128.ipp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index c2ee6cd0..bfa4df56 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -31,6 +31,9 @@ #if defined(BOOST_HAS_INT128) #undef BOOST_HAS_INT128 #endif +#if defined(BOOST_HAS_FLOAT128) +#undef BOOST_HAS_FLOAT128 +#endif // 32 functions are missing from the current RTL in cwchar, so it really can not be used even if it exists diff --git a/test/boost_has_float128.ipp b/test/boost_has_float128.ipp index 80b211c1..1c36fd40 100644 --- a/test/boost_has_float128.ipp +++ b/test/boost_has_float128.ipp @@ -22,6 +22,10 @@ int test() __float128 big_float = 0.0Q; #endif (void)&big_float; + + __float128 i(2.00), j(1.00), k; + k = i / j; + return 0; } From db53db48e5ede4e478a8474676e2e0af269d2cda Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sun, 12 Apr 2020 06:30:42 -0400 Subject: [PATCH 3/3] Corrected code. --- test/boost_has_int128.ipp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/boost_has_int128.ipp b/test/boost_has_int128.ipp index c581acc6..abc10063 100644 --- a/test/boost_has_int128.ipp +++ b/test/boost_has_int128.ipp @@ -64,8 +64,8 @@ int test() return 1; } - my_uint128_t i(2), j(1), k; - k = i / j; + my_uint128_t ii(2), jj(1), kk; + kk = ii / jj; return 0; }