Enable -Wstrict-aliasing=1 (GCC)

Fixed partially.
This commit is contained in:
Nekotekina 2021-03-08 23:41:23 +03:00
parent 3990e2d3e6
commit a4fdbf0a88
34 changed files with 141 additions and 81 deletions

View file

@ -344,7 +344,9 @@ struct fmt::cfmt_src
template <typename T>
T get(usz index) const
{
return *reinterpret_cast<const T*>(reinterpret_cast<const u8*>(args + index));
T res{};
std::memcpy(&res, reinterpret_cast<const u8*>(args + index), sizeof(res));
return res;
}
void skip(usz extra)