On Wed, Nov 11, 2020 at 5:18 PM Martin Storsjö <mar...@martin.st> wrote: > On Wed, 11 Nov 2020, David Michael wrote: > > There are two issues: > > > > The unused global integer does not make it into the compiled object > > file, so declare it static to correct this. > > Umm, what? That sounds entirely counterintuitive to me. > > If the global integer is non-static, it could be referred to by another > object file, so the compiler cannot omit it from the generated object > file. On the other side, if the variable is static, the compiler has full > visibility over any possible use, and sees that nothing in the same object > file refers to it, and thus can omit it if it's unused.
LTO removes it if it is not static. It is always present when it is static. Thanks. David _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".