Skip to content

awkward-cpp: error: dereferencing type-punned pointer will break strict-aliasing rules #3513

@APN-Pucky

Description

@APN-Pucky

Version of Awkward Array

2.8.3

Description and code to reproduce

Similar to #3504

/var/tmp/portage/dev-python/awkward-cpp-46/work/awkward_cpp-46/src/libawkward/forth/ForthOutputBuffer.cpp:651:17:   required from here
  651 |       byteswap32(num_items, ptr_.get()[length_]);
      |       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/dev-python/awkward-cpp-46/work/awkward_cpp-46/src/libawkward/forth/ForthOutputBuffer.cpp:35:15: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   35 |       *ptr = *reinterpret_cast<T*>(&output);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

See-also: https://bugs.gentoo.org/956029

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug (unverified)The problem described would be a bug, but needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions