Eliminate redundant semicolons in BLAZE_CACHE_SIZE/BLAZE_USE_PADDING

Issue #188 resolved
Daniel Baker created an issue

-Wpedantic causes the following warnings when compiling without overriding the default BLAZE_CACHE_SIZE and BLAZE_USE_PADDING:

In file included from blaze/blaze/math/views/subvector/Dense.h:77,
                 from blaze/blaze/math/views/Subvector.h:73,
                 from blaze/blaze/math/smp/openmp/DenseVector.h:59,
                 from blaze/blaze/math/smp/DenseVector.h:46,
                 from blaze/blaze/math/Band.h:48,
                 from blaze/blaze/Math.h:46,
                 from src/bztest.cpp:2:
blaze/blaze/system/CacheSize.h:58:46: warning: extra ‘;’ [-Wpedantic]
 constexpr size_t cacheSize = BLAZE_CACHE_SIZE;
                                              ^
In file included from blaze/blaze/math/views/subvector/Dense.h:79,
                 from blaze/blaze/math/views/Subvector.h:73,
                 from blaze/blaze/math/smp/openmp/DenseVector.h:59,
                 from blaze/blaze/math/smp/DenseVector.h:46,
                 from blaze/blaze/math/Band.h:48,
                 from blaze/blaze/Math.h:46,
                 from src/bztest.cpp:2:
blaze/blaze/system/Optimizations.h:56:55: warning: extra ‘;’ [-Wpedantic]
 constexpr bool usePadding          = BLAZE_USE_PADDING;

I propose this diff: diff --git a/blaze/config/CacheSize.h b/blaze/config/CacheSize.h index f2c0c63..21537e7 100644 --- a/blaze/config/CacheSize.h +++ b/blaze/config/CacheSize.h @@ -52,6 +52,6 @@ \endcode */ #ifndef BLAZE_CACHE_SIZE -#define BLAZE_CACHE_SIZE 3145728UL; +#define BLAZE_CACHE_SIZE 3145728UL #endif //************************************************************************************************* diff --git a/blaze/config/Optimizations.h b/blaze/config/Optimizations.h index d030107..6812a0c 100644 --- a/blaze/config/Optimizations.h +++ b/blaze/config/Optimizations.h @@ -59,7 +59,7 @@ \endcode */ #ifndef BLAZE_USE_PADDING -#define BLAZE_USE_PADDING 1; +#define BLAZE_USE_PADDING 1 #endif //************************************************************************************************* This eliminates the warnings; I could simply override both macros myself or turn off -Wpedantic, but it would be nice for it to not be present by default.

Comments (6)

  1. Klaus Iglberger

    Hi Daniel!

    Thanks a lot for creating this issue. You are absolutely correct, this is an oversight on our side. We apologize for the inconvenience. We have already fixed the problem, so you can expect this problem to be gone after the next push. Thanks again,

    Best regards,

    Klaus!

  2. Klaus Iglberger

    Commit d42d0c5 removes the redundant semicolons in the in the BLAZE_USE_PADDING and BLAZE_CACHE_SIZE macros. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.4.

  3. Log in to comment