Comments (2)
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.
I think this could be fixed by setting the alignment of data
to alignas(T, T*)
from catch2.
Related Issues (20)
- Handle ANSI escape sequences during text wrapping
- Bring back Single-Header capability HOT 2
- AddressSanitizer reports container overflow during benchmarking HOT 3
- Latest macOS system header causes compilation failures on GCC HOT 4
- Compilation fails with `error: arithmetic on a pointer to an incomplete type` HOT 1
- Combine test filters with filenames HOT 2
- Section filter command line option only works for sections without whitespace in name HOT 1
- Separate headers for "extra" std types
- Catch2 does not appear to work with C++23
- version 3.5.4 does not compile
- JUnit and console reporter discrepency.
- Provide means to obtain current test case name and current section name HOT 1
- GENERATOR doesn't allow use constants HOT 1
- Memory leak when using exit()
- Compile Error While using Catch::Clara::Parser HOT 1
- Allow the Catch2 library to be compiled with address sanitizer enabled
- Fixture's destructor called before retrieving uncaught exception's message
- How does (can) auto-registration work?
- CTest (using catch_discover_tests) treats skipped tests as failed
- Exit code of 127 when all tests pass (only on Windows Release build) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from catch2.