diff --git a/.github/workflows/msys2-clang.yml b/.github/workflows/msys2-clang.yml index 44ee983..21a2abd 100644 --- a/.github/workflows/msys2-clang.yml +++ b/.github/workflows/msys2-clang.yml @@ -50,7 +50,7 @@ jobs: install: ${{ matrix.install }} - name: Install dependencies - run: script/ci_install_deps.sh && clang++ -dM -E - < /dev/null + run: script/ci_install_deps.sh - name: Configure run: cmake -DCMAKE_CXX_COMPILER=clang++ -S test -B build -DCMAKE_BUILD_TYPE=Debug diff --git a/include/ss/extract.hpp b/include/ss/extract.hpp index 0c0c3e1..e6f65f0 100644 --- a/include/ss/extract.hpp +++ b/include/ss/extract.hpp @@ -35,12 +35,13 @@ inline std::optional from_char(char c) { return std::nullopt; } -#define MING32_CLANG \ - defined(__clang__) && defined(__MINGW32__) && !defined(__MINGW64__) +#if defined(__clang__) && defined(__MINGW32__) && !defined(__MINGW64__) +#define MINGW32_CLANG +#endif // mingw32 clang does not support some of the builtin functions #if (defined(__clang__) || defined(__GNUC__) || defined(__GUNG__)) && \ - (MING32_CLANG == false) + !defined(MINGW32_CLANG) #warning "using mul functions" //////////////// // mul overflow detection @@ -200,7 +201,7 @@ std::enable_if_t, std::optional> to_num( } #if (defined(__clang__) || defined(__GNUC__) || defined(__GUNG__)) && \ - (MING32_CLANG == false) + !defined(MINGW32_CLANG) auto add_last_digit_owerflow = (is_negative) ? sub_overflow : add_overflow; #else