From 9cfa5ff4a002596885d0fcadfe9dcd5b7a0bf496 Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Wed, 12 Feb 2025 23:24:13 +0000 Subject: [PATCH 1/3] fix warnings from -Wundef --- .github/workflows/ubuntu24.yml | 26 ++++++++++++++++---------- benchmarks/event_counter.h | 2 +- include/fast_float/float_common.h | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ubuntu24.yml b/.github/workflows/ubuntu24.yml index 8da4c5f..3dad9dd 100644 --- a/.github/workflows/ubuntu24.yml +++ b/.github/workflows/ubuntu24.yml @@ -9,15 +9,21 @@ jobs: - uses: actions/checkout@v4 - name: Use cmake run: | - mkdir build && - cd build && - CXXFLAGS=-Werror cmake -DFASTFLOAT_TEST=ON -D FASTFLOAT_BENCHMARKS=ON .. && - cmake --build . && - ctest --output-on-failure + set -xe + cmake -B build \ + -DFASTFLOAT_TEST=ON \ + -DFASTFLOAT_BENCHMARKS=ON \ + -DCMAKE_CXX_FLAGS=' -Werror -Wundef ' + cmake --build build --parallel + ( cd build ; ctest --output-on-failure ) - name: Use cmake CXX23 run: | - mkdir build20 && - cd build20 && - CXXFLAGS=-Werror cmake -DFASTFLOAT_CONSTEXPR_TESTS=ON -DFASTFLOAT_FIXEDWIDTH_TESTS=ON -DFASTFLOAT_CXX_STANDARD=23 -DFASTFLOAT_TEST=ON .. && - cmake --build . && - ctest --output-on-failure \ No newline at end of file + set -xe + cmake -B build20 \ + -DFASTFLOAT_TEST=ON \ + -DFASTFLOAT_CONSTEXPR_TESTS=ON \ + -DFASTFLOAT_FIXEDWIDTH_TESTS=ON \ + -DFASTFLOAT_CXX_STANDARD=23 \ + -DCMAKE_CXX_FLAGS=' -Werror -Wundef ' + cmake --build build20 --parallel + ( cd build20 ; ctest --output-on-failure ) diff --git a/benchmarks/event_counter.h b/benchmarks/event_counter.h index 22cc513..cd59478 100644 --- a/benchmarks/event_counter.h +++ b/benchmarks/event_counter.h @@ -17,7 +17,7 @@ #include #endif -#if __APPLE__ && __aarch64__ +#if (defined(__APPLE__) && __APPLE__) && (defined(__aarch64__) && __aarch64__) #include "apple_arm_events.h" #endif diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index ef499ce..2d2afca 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -9,7 +9,7 @@ #include #include #ifdef __has_include -#if __has_include() && (__cplusplus > 202002L || _MSVC_LANG > 202002L) +#if __has_include() && (__cplusplus > 202002L || (defined(_MSVC_LANG) && (_MSVC_LANG > 202002L))) #include #endif #endif From 3e9dc96eb4ee044b51b3efe66af1ef48213f64e5 Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Thu, 13 Feb 2025 08:38:16 +0000 Subject: [PATCH 2/3] Fix -Wundef warnings seen in gcc 4.8 and 4.9 --- include/fast_float/constexpr_feature_detect.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fast_float/constexpr_feature_detect.h b/include/fast_float/constexpr_feature_detect.h index 7624bea..648b55d 100644 --- a/include/fast_float/constexpr_feature_detect.h +++ b/include/fast_float/constexpr_feature_detect.h @@ -8,7 +8,7 @@ #endif // Testing for https://wg21.link/N3652, adopted in C++14 -#if __cpp_constexpr >= 201304 +#if defined(__cpp_constexpr) && __cpp_constexpr >= 201304 #define FASTFLOAT_CONSTEXPR14 constexpr #else #define FASTFLOAT_CONSTEXPR14 @@ -29,6 +29,7 @@ // Testing for relevant C++20 constexpr library features #if FASTFLOAT_HAS_IS_CONSTANT_EVALUATED && FASTFLOAT_HAS_BIT_CAST && \ + defined(__cpp_lib_constexpr_algorithms) && \ __cpp_lib_constexpr_algorithms >= 201806L /*For std::copy and std::fill*/ #define FASTFLOAT_CONSTEXPR20 constexpr #define FASTFLOAT_IS_CONSTEXPR 1 From c584342aa52f0feba04b6bdad70b147b8374c55f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 00:21:03 +0000 Subject: [PATCH 3/3] Bump uraimo/run-on-arch-action from 2 to 3 in the github-actions group Bumps the github-actions group with 1 update: [uraimo/run-on-arch-action](https://github.com/uraimo/run-on-arch-action). Updates `uraimo/run-on-arch-action` from 2 to 3 - [Release notes](https://github.com/uraimo/run-on-arch-action/releases) - [Commits](https://github.com/uraimo/run-on-arch-action/compare/v2...v3) --- updated-dependencies: - dependency-name: uraimo/run-on-arch-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/s390x.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/s390x.yml b/.github/workflows/s390x.yml index fb2f8ed..9eaad27 100644 --- a/.github/workflows/s390x.yml +++ b/.github/workflows/s390x.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: uraimo/run-on-arch-action@v2 + - uses: uraimo/run-on-arch-action@v3 name: Test id: runcmd with: