Le 16/06/2017 à 22:50, Eero Tamminen a écrit :
Hm. I'm doing builds with DebugRelease (-O2), but when I switched to
Release (-O3) build type, I do get the warning too.
Anyway, it's still a bug in GCC warnings code.
(And not the first one. Earlier GCC showed a *lot* of bogus warnings
because warnings checks were done before most of the optimization
passes which actually analyze whether given situation can actually
happen.)
I agree, but since people compiling Hatari (individual or distrib
maintainers) are more likely to compile in "release" mode, I think we
should remove as much warnings as possible, even if that's due to a lack
of "cleverness" from the compiler.
I'm seeing a lot of warnings also from FPU emulation and single warnings
from sound.c, custom.c & gencpu.c.
mostly everything in cpu/ comes from WinUAE, which uses a different
compiler. I try to not change original winuae's code as it makes merging
harder later. In the case of cpu/ there's extra flags in cmakefile to
ignore those warnings (they should be updated for recent fpu changes)