Disable spurious gcc warning in `xfunction::broadcast_shape` by hsanzg · Pull Request #2816 · xtensor-stack/xtensor

Checklist

  • The title and commit message(s) are descriptive.
  • Small commits made to fix your PR have been squashed to avoid history pollution.
  • Tests have been added for new features or bug fixes.
  • API of new functions and classes are documented.

Description

Recent versions of gcc emit an incorrect array-bounds warning when copying the cached shape into the passed input, if the latter is of type std::array<size_t, 1>.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107852