Closed kostadinsh closed 1 year ago
FWIW, the getdword_n
bits in https://github.com/knik0/faad2/commit/a6ed5189b2c62b5d6fabc95132b2fc96a2be8727 look like aliasing volations too. I suspect https://github.com/projg2/portable-endianness can help there.
In that change I've just moved getdword_n
in source code, but agree, it looks horrible at least - both type-punning and fall-through... Going to rewrite it. And take care of flt_round
soon.
Thank you! (Yes, sorry, I was lazy with the link. Oops.)
Much cleaner now and I think some of the big-endian paths weren't right before either (indices looked possibly a bit off), so a double win! Many thanks.
faad2 fails to build with -Werror=strict-aliasing added to CFLAGS and CXXFLAGS
gcc version: (Gentoo 13.1.1_p20230527 p3) 13.1.1 20230527
Steps to reproduce:
mkdir build && cd build
CFLAGS="-O2 -Werror=strict-aliasing" CXXFLAGS="-O2 -Werror=strict-aliasing" cmake ..
make VERBOSE=1
Gentoo bug: https://bugs.gentoo.org/859844