diff --git a/.github/workflows/wide_integer.yml b/.github/workflows/wide_integer.yml index 178c4360..562b1ef7 100644 --- a/.github/workflows/wide_integer.yml +++ b/.github/workflows/wide_integer.yml @@ -217,6 +217,40 @@ jobs: echo "ls ./wide_integer.exe" ls -la ./wide_integer.exe ./wide_integer.exe + gcc-12-clang-14: + runs-on: ubuntu-22.04 + defaults: + run: + shell: bash + strategy: + fail-fast: false + matrix: + standard: [ c++11, c++14, c++17, c++20, c++2b ] + compiler: [ g++-12, clang++-14 ] + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '0' + - name: update-tools + run: sudo apt install g++-12 clang-14 + - name: clone-submods-bootstrap-headers-boost-develop + run: | + git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root + cd ../boost-root + git submodule update --init tools + git submodule update --init libs/config + git submodule update --init libs/multiprecision + ./bootstrap.sh + ./b2 headers + - name: gcc-12-clang-14 + run: | + grep BOOST_VERSION ../boost-root/boost/version.hpp + echo "compile ./wide_integer.exe" + ${{ matrix.compiler }} -v + ${{ matrix.compiler }} -finline-functions -m64 -O3 -Werror -Wall -Wextra -Wconversion -Wsign-conversion -Wshadow -Wundef -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -DWIDE_INTEGER_HAS_LIMB_TYPE_UINT64 -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_uintwide_t_boost_backend.cpp test/test_uintwide_t_edge_cases.cpp test/test_uintwide_t_examples.cpp test/test_uintwide_t_float_convert.cpp test/test_uintwide_t_int_convert.cpp test/test_uintwide_t_n_base.cpp test/test_uintwide_t_n_binary_ops_base.cpp test/test_uintwide_t_spot_values.cpp examples/example000_numeric_limits.cpp examples/example000a_builtin_convert.cpp examples/example001_mul_div.cpp examples/example001a_div_mod.cpp examples/example002_shl_shr.cpp examples/example003_sqrt.cpp examples/example003a_cbrt.cpp examples/example004_rootk_pow.cpp examples/example005_powm.cpp examples/example005a_pow_factors_of_p99.cpp examples/example006_gcd.cpp examples/example007_random_generator.cpp examples/example008_miller_rabin_prime.cpp examples/example008a_miller_rabin_prime.cpp examples/example009_timed_mul.cpp examples/example009a_timed_mul_4_by_4.cpp examples/example009b_timed_mul_8_by_8.cpp examples/example010_uint48_t.cpp examples/example011_uint24_t.cpp examples/example012_rsa_crypto.cpp -o wide_integer.exe + echo "ls ./wide_integer.exe" + ls -la ./wide_integer.exe + ./wide_integer.exe gcc-clang-10_up: runs-on: ubuntu-20.04 defaults: diff --git a/boost/multiprecision/uintwide_t_backend.hpp b/boost/multiprecision/uintwide_t_backend.hpp index 7fdc68e8..c8409201 100644 --- a/boost/multiprecision/uintwide_t_backend.hpp +++ b/boost/multiprecision/uintwide_t_backend.hpp @@ -36,6 +36,11 @@ #endif #endif + #if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wrestrict" + #endif + #if (BOOST_VERSION < 108000) #if (defined(__clang__) && (__clang_major__ > 9)) && !defined(__APPLE__) #pragma GCC diagnostic push @@ -1059,6 +1064,10 @@ #endif #endif + #if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) + #pragma GCC diagnostic pop + #endif + #if (BOOST_VERSION < 108000) #if defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/examples/example008a_miller_rabin_prime.cpp b/examples/example008a_miller_rabin_prime.cpp index 465313bf..c2d767d6 100644 --- a/examples/example008a_miller_rabin_prime.cpp +++ b/examples/example008a_miller_rabin_prime.cpp @@ -36,6 +36,11 @@ #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wrestrict" +#endif + #if (BOOST_VERSION < 108000) #if (defined(__clang__) && (__clang_major__ > 9)) && !defined(__APPLE__) #pragma GCC diagnostic push @@ -204,6 +209,10 @@ auto main() -> int // NOLINT(bugprone-exception-escape) #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic pop +#endif + #if (BOOST_VERSION < 108000) #if defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/test/test.cpp b/test/test.cpp index 31056063..374f764d 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -49,6 +49,11 @@ #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wrestrict" +#endif + #if (BOOST_VERSION < 107900) #include #endif @@ -525,6 +530,10 @@ auto main() -> int // NOLINT(bugprone-exception-escape) return (result_is_ok ? 0 : -1); } +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic pop +#endif + #if (BOOST_VERSION < 107900) #if defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/test/test_uintwide_t_boost_backend.cpp b/test/test_uintwide_t_boost_backend.cpp index 5d60568a..daefc59b 100644 --- a/test/test_uintwide_t_boost_backend.cpp +++ b/test/test_uintwide_t_boost_backend.cpp @@ -26,6 +26,11 @@ #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wrestrict" +#endif + #if (BOOST_VERSION < 108000) #if (defined(__clang__) && (__clang_major__ > 9)) && !defined(__APPLE__) #pragma GCC diagnostic push @@ -123,6 +128,10 @@ auto math::wide_integer::test_uintwide_t_boost_backend() -> bool #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic pop +#endif + #if (BOOST_VERSION < 108000) #if defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/test/test_uintwide_t_boost_backend_via_test_arithmetic.cpp b/test/test_uintwide_t_boost_backend_via_test_arithmetic.cpp index 6f643348..5ff33b51 100644 --- a/test/test_uintwide_t_boost_backend_via_test_arithmetic.cpp +++ b/test/test_uintwide_t_boost_backend_via_test_arithmetic.cpp @@ -25,6 +25,11 @@ #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wrestrict" +#endif + #if (BOOST_VERSION < 108000) #if (defined(__clang__) && (__clang_major__ > 9)) && !defined(__APPLE__) #pragma GCC diagnostic push @@ -74,6 +79,10 @@ auto main() -> int #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic pop +#endif + #if (BOOST_VERSION < 108000) #if defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/test/test_uintwide_t_edge_cases.cpp b/test/test_uintwide_t_edge_cases.cpp index 71aa7f40..4661263d 100644 --- a/test/test_uintwide_t_edge_cases.cpp +++ b/test/test_uintwide_t_edge_cases.cpp @@ -28,6 +28,11 @@ #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wrestrict" +#endif + #if (BOOST_VERSION < 108000) #if (defined(__clang__) && (__clang_major__ > 9)) && !defined(__APPLE__) #pragma GCC diagnostic push @@ -173,6 +178,10 @@ auto math::wide_integer::test_uintwide_t_edge_cases() -> bool #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic pop +#endif + #if (BOOST_VERSION < 108000) #if defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/test/test_uintwide_t_float_convert.cpp b/test/test_uintwide_t_float_convert.cpp index ef7dd878..a1eecb25 100644 --- a/test/test_uintwide_t_float_convert.cpp +++ b/test/test_uintwide_t_float_convert.cpp @@ -32,6 +32,11 @@ #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wrestrict" +#endif + #if (BOOST_VERSION < 108000) #if (defined(__clang__) && (__clang_major__ > 9)) && !defined(__APPLE__) #pragma GCC diagnostic push @@ -279,6 +284,10 @@ auto math::wide_integer::test_uintwide_t_float_convert() -> bool #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic pop +#endif + #if (BOOST_VERSION < 108000) #if defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/test/test_uintwide_t_int_convert.cpp b/test/test_uintwide_t_int_convert.cpp index 59d362ae..9d95f7e4 100644 --- a/test/test_uintwide_t_int_convert.cpp +++ b/test/test_uintwide_t_int_convert.cpp @@ -32,6 +32,11 @@ #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wrestrict" +#endif + #if (BOOST_VERSION < 108000) #if (defined(__clang__) && (__clang_major__ > 9)) && !defined(__APPLE__) #pragma GCC diagnostic push @@ -191,6 +196,10 @@ auto math::wide_integer::test_uintwide_t_int_convert() -> bool #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic pop +#endif + #if (BOOST_VERSION < 108000) #if defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/test/test_uintwide_t_n_base.h b/test/test_uintwide_t_n_base.h index 7d88a5f8..c29e0d6f 100644 --- a/test/test_uintwide_t_n_base.h +++ b/test/test_uintwide_t_n_base.h @@ -33,6 +33,11 @@ #endif #endif + #if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wrestrict" + #endif + #if (BOOST_VERSION < 108000) #if (defined(__clang__) && (__clang_major__ > 9)) && !defined(__APPLE__) #pragma GCC diagnostic push @@ -150,6 +155,10 @@ #endif #endif + #if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) + #pragma GCC diagnostic pop + #endif + #if (BOOST_VERSION < 108000) #if defined(__GNUC__) #pragma GCC diagnostic pop diff --git a/test/test_uintwide_t_n_binary_ops_base.cpp b/test/test_uintwide_t_n_binary_ops_base.cpp index 4ed7ad31..4c1201ca 100644 --- a/test/test_uintwide_t_n_binary_ops_base.cpp +++ b/test/test_uintwide_t_n_binary_ops_base.cpp @@ -26,6 +26,11 @@ #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wrestrict" +#endif + #if (BOOST_VERSION < 108000) #if (defined(__clang__) && (__clang_major__ > 9)) && !defined(__APPLE__) #pragma GCC diagnostic push @@ -55,6 +60,10 @@ auto test_uintwide_t_n_binary_ops_base::my_gen() -> test_uintwide_t_n_binary_ops #endif #endif +#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)) +#pragma GCC diagnostic pop +#endif + #if (BOOST_VERSION < 108000) #if defined(__GNUC__) #pragma GCC diagnostic pop