Skip to content

half-float raise function conflict #27

Description

@davidbrochart

With a fresh conda environment:

mamba install make cmake gtest compilers xtensor=0.23.0 xtensor-io=0.12.0 xsimd=7.4.8 nlohmann_json=3.2.0

After entering:

cmake .. -DBUILD_TESTS=ON
make xtest

I get the following errors:

In file included from /home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray_impl.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray.hpp:19,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:11:
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp: In function 'T half_float::detail::half2int(unsigned int)':
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:962:21: error: call of overloaded 'raise(<unnamed enum>)' is ambiguous
  962 |     raise(FE_INVALID);
      |                     ^
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:292:15: note: candidate: 'void half_float::detail::raise(int, bool)'
  292 |   inline void raise(int HALF_UNUSED_NOERR(flags), bool HALF_UNUSED_NOERR(cond) = true) {
      |               ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/sys/wait.h:31,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/internal/gtest-internal.h:45,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/gtest.h:62,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:10:
/home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/signal.h:138:12: note: candidate: 'int raise(int)'
  138 | extern int raise (int __sig) __THROW;
      |            ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray_impl.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray.hpp:19,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:11:
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:979:21: error: call of overloaded 'raise(<unnamed enum>)' is ambiguous
  979 |     raise(FE_INVALID);
      |                     ^
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:292:15: note: candidate: 'void half_float::detail::raise(int, bool)'
  292 |   inline void raise(int HALF_UNUSED_NOERR(flags), bool HALF_UNUSED_NOERR(cond) = true) {
      |               ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/sys/wait.h:31,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/internal/gtest-internal.h:45,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/gtest.h:62,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:10:
/home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/signal.h:138:12: note: candidate: 'int raise(int)'
  138 | extern int raise (int __sig) __THROW;
      |            ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray_impl.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray.hpp:19,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:11:
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:981:21: error: call of overloaded 'raise(<unnamed enum>)' is ambiguous
  981 |     raise(FE_INEXACT);
      |                     ^
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:292:15: note: candidate: 'void half_float::detail::raise(int, bool)'
  292 |   inline void raise(int HALF_UNUSED_NOERR(flags), bool HALF_UNUSED_NOERR(cond) = true) {
      |               ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/sys/wait.h:31,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/internal/gtest-internal.h:45,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/gtest.h:62,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:10:
/home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/signal.h:138:12: note: candidate: 'int raise(int)'
  138 | extern int raise (int __sig) __THROW;
      |            ^~~~~

It looks like half-float's raise function conflicts with signal.h's one. Any idea @0xBYTESHIFT?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions