libbitcoin / libbitcoin-system

Bitcoin Cross-Platform C++ Development Toolkit

Home Page:https://libbitcoin.info/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GCC: warning: ignoring attributes on template argument.

evoskuil opened this issue · comments

In file included from ./include/bitcoin/system/intrinsics/haves.hpp:26,
                 from ./include/bitcoin/system/intrinsics/intrinsics.hpp:24,
                 from ./include/bitcoin/system/impl/math/byteswap.ipp:24,
                 from ./include/bitcoin/system/math/byteswap.hpp:57,
                 from ./include/bitcoin/system/math/math.hpp:25,
                 from ./include/bitcoin/system/chain/enums/forks.hpp:23,
                 from ./include/bitcoin/system/chain/context.hpp:23,
                 from ./include/bitcoin/system/chain/block.hpp:24,
                 from ./include/bitcoin/system/chain/chain.hpp:22,
                 from ./include/bitcoin/system/settings.hpp:22,
                 from ./include/bitcoin/system.hpp:25,
                 from examples/main.cpp:21:
./include/bitcoin/system/intrinsics/xcpu/functional_128.hpp:149:29: warning: ignoring attributes on template argument ‘libbitcoin::system::xint128_t’ {aka ‘__m128i’} [-Wignored-attributes]
  149 |     if_same<xWord, xint128_t> = true, if_integral_integer<Word> = true>
      |                             ^
./include/bitcoin/system/intrinsics/xcpu/functional_128.hpp:187:51: warning: ignoring attributes on template argument ‘libbitcoin::system::xint128_t’ {aka ‘__m128i’} [-Wignored-attributes]
  187 | template <typename xWord, if_same<xWord, xint128_t> = true>
      |                                                   ^
./include/bitcoin/system/intrinsics/xcpu/functional_128.hpp:195:51: warning: ignoring attributes on template argument ‘libbitcoin::system::xint128_t’ {aka ‘__m128i’} [-Wignored-attributes]
  195 | template <typename xWord, if_same<xWord, xint128_t> = true>
      |                                                   ^
./include/bitcoin/system/intrinsics/xcpu/functional_128.hpp:203:51: warning: ignoring attributes on template argument ‘libbitcoin::system::xint128_t’ {aka ‘__m128i’} [-Wignored-attributes]
  203 | template <typename xWord, if_same<xWord, xint128_t> = true>
      |                                                   ^
./include/bitcoin/system/intrinsics/xcpu/functional_128.hpp:213:51: warning: ignoring attributes on template argument ‘libbitcoin::system::xint128_t’ {aka ‘__m128i’} [-Wignored-attributes]
  213 | template <typename xWord, if_same<xWord, xint128_t> = true>
      |                                                   ^

https://github.com/libbitcoin/libbitcoin-system/actions/runs/7681642280/job/20949298061?pr=1378#step:8:613

There is a detailed explanation of this issue here.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97222

The compiler bug is legit, also applies to Clang, and impacts the ABI. It is marked with an undefined status of 'SUSPENDED'... WTF?

We have not encountered any failures despite extensive runtime testing with the affected Intel intrinsic types. I suggest that we suppress this warning [-Wignored-attributes] as there appears to be no other alternative except avoidance of templates.

Resolved