cast: disable adddress-of-packed-member in alignment cast
This commit is contained in:
parent
3c78e19c99
commit
0d265db0c7
3
cast.hpp
3
cast.hpp
@ -178,6 +178,9 @@ namespace cruft::cast {
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
#ifdef COMPILER_GCC
|
||||
#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
|
||||
#endif
|
||||
CHECK_MOD (reinterpret_cast<uintptr_t> (src), alignof (std::remove_pointer_t<DstT>));
|
||||
return reinterpret_cast<DstT> (src);
|
||||
#pragma GCC diagnostic pop
|
||||
|
Loading…
Reference in New Issue
Block a user