Giter Site home page Giter Site logo

Comments (2)

misuzu avatar misuzu commented on June 12, 2024

I've the same issue on armv7l-linux

catch2> [ 85%] Building CXX object tests/CMakeFiles/SelfTest.dir/SelfTest/UsageTests/Benchmark.tests.cpp.o
catch2> In file included from /build/source/tests/SelfTest/UsageTests/Benchmark.tests.cpp:12:
catch2> /build/source/src/catch2/../catch2/benchmark/catch_constructor.hpp: In instantiation of 'T& Catch::Benchmark::Detail::ObjectStorage<T, Destruct>::stored_object() [with T = std::__cxx11::basic_string<char>; bool Destruct = false]':
catch2> /build/source/src/catch2/../catch2/benchmark/catch_constructor.hpp:46:34:   required from 'std::enable_if_t<AllowManualDestruction> Catch::Benchmark::Detail::ObjectStorage<T, Destruct>::destruct() [with bool AllowManualDestruction = true; T = std::__cxx11::basic_string<char>; bool Destruct = false; std::enable_if_t<AllowManualDestruction> = void]'
catch2> /build/source/tests/SelfTest/UsageTests/Benchmark.tests.cpp:153:59:   required from here
catch2> /build/source/src/catch2/../catch2/benchmark/catch_constructor.hpp:61:46: error: cast from 'unsigned char*' to 'std::__cxx11::basic_string<char>*' increases required alignment of target type [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-align-Werror=cast-align8;;]
catch2>    61 |                 T& stored_object() { return *reinterpret_cast<T*>( data ); }
catch2>       |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
catch2> /build/source/src/catch2/../catch2/benchmark/catch_constructor.hpp: In instantiation of 'T& Catch::Benchmark::Detail::ObjectStorage<T, Destruct>::stored_object() [with T = std::__cxx11::basic_string<char>; bool Destruct = true]':
catch2> /build/source/src/catch2/../catch2/benchmark/catch_constructor.hpp:46:34:   required from 'std::enable_if_t<AllowManualDestruction> Catch::Benchmark::Detail::ObjectStorage<T, Destruct>::destruct() [with bool AllowManualDestruction = true; T = std::__cxx11::basic_string<char>; bool Destruct = true; std::enable_if_t<AllowManualDestruction> = void]'
catch2> /build/source/src/catch2/../catch2/benchmark/catch_constructor.hpp:52:97:   required from 'void Catch::Benchmark::Detail::ObjectStorage<T, Destruct>::destruct_on_exit(std::enable_if_t<Destruct, U>*) [with U = std::__cxx11::basic_string<char>; T = std::__cxx11::basic_string<char>; bool Destruct = true; std::enable_if_t<Destruct, U> = std::__cxx11::basic_string<char>]'
catch2> /build/source/src/catch2/../catch2/benchmark/catch_constructor.hpp:35:55:   required from 'Catch::Benchmark::Detail::ObjectStorage<T, Destruct>::~ObjectStorage() [with T = std::__cxx11::basic_string<char>; bool Destruct = true]'
catch2> /nix/store/spipxxlrlpxn3981gjv7mkxjabwdw4z7-gcc-13.2.0/include/c++/13.2.0/bits/stl_construct.h:151:22:   required from 'constexpr void std::_Destroy(_Tp*) [with _Tp = Catch::Benchmark::Detail::ObjectStorage<__cxx11::basic_string<char>, true>]'
catch2> /nix/store/spipxxlrlpxn3981gjv7mkxjabwdw4z7-gcc-13.2.0/include/c++/13.2.0/bits/stl_construct.h:163:19:   required from 'static void std::_Destroy_aux<<anonymous> >::__destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = Catch::Benchmark::Detail::ObjectStorage<std::__cxx11::basic_string<char>, true>*; bool <anonymous> = false]'
catch2> /nix/store/spipxxlrlpxn3981gjv7mkxjabwdw4z7-gcc-13.2.0/include/c++/13.2.0/bits/stl_construct.h:196:11:   required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = Catch::Benchmark::Detail::ObjectStorage<__cxx11::basic_string<char>, true>*]'
catch2> /nix/store/spipxxlrlpxn3981gjv7mkxjabwdw4z7-gcc-13.2.0/include/c++/13.2.0/bits/alloc_traits.h:947:20:   required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = Catch::Benchmark::Detail::ObjectStorage<__cxx11::basic_string<char>, true>*; _Tp = Catch::Benchmark::Detail::ObjectStorage<__cxx11::basic_string<char>, true>]'
catch2> /nix/store/spipxxlrlpxn3981gjv7mkxjabwdw4z7-gcc-13.2.0/include/c++/13.2.0/bits/stl_vector.h:732:15:   required from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = Catch::Benchmark::Detail::ObjectStorage<std::__cxx11::basic_string<char>, true>; _Alloc = std::allocator<Catch::Benchmark::Detail::ObjectStorage<std::__cxx11::basic_string<char>, true> >]'
catch2> /build/source/tests/SelfTest/UsageTests/Benchmark.tests.cpp:145:89:   required from here
catch2> /build/source/src/catch2/../catch2/benchmark/catch_constructor.hpp:61:46: error: cast from 'unsigned char*' to 'std::__cxx11::basic_string<char>*' increases required alignment of target type [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-align-Werror=cast-align8;;]
``

from catch2.

p4vook avatar p4vook commented on June 12, 2024

I think this could be fixed by setting the alignment of data to alignas(T, T*)

from catch2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.