mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-25 20:30:33 -04:00

gcc 10 is miscompiling libdeflate on x86_64 at -O3 due to a regression in how packed structs are handled (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94994). Work around this by just always using memcpy() for unaligned accesses. It's unclear that the "packed struct" approach is worthwhile to maintain anymore. Currently I'm only aware that it's useful with old gcc's on arm32. Hopefully, compilers are good enough now that we can simply use memcpy() everywhere. Update https://github.com/ebiggers/libdeflate/issues/64