
Am 06.12.19 um 11:54 schrieb Michal Suchánek:
On Fri, Dec 06, 2019 at 11:43:29AM +0100, Hans-Peter Jansen wrote:
Am Freitag, 6. Dezember 2019, 11:14:35 CET schrieb Michal Kubecek:
On Friday, 6 December 2019 11:00 Hans-Peter Jansen wrote:
today, I noticed some deviations of warnings between Leap and Factory package builds with gcc. E.g. for this package:
https://build.opensuse.org/package/show/network:telephony/hylafax+
These two warnings in Leap 15.2[1]: ...
My question is, where this deviation originates?
My guess would be gcc 9.2 (Factory) vs. gcc 7.4 (15.2).
Thanks Michal, but what happened to these underlying potential overflows then? Does gcc fix them silently, or do they still exist, but these warnings vanished?
Or they were false positives. That happens too.
Thanks
Michal
Some GCC warnings come from its middle end and hence depend on which optimizations the compiler was able to carry out. See [1] which lists -Wformat-overflow as one of them. Such warnings can appear or disappear randomly based on the optimization flags you use and obviously the compiler version. There are, as far as I know, no real guarantees about them. The upside of middle-end warnings is that the compiler can do some static analysis efficiently across function boundaries (whereas frontend warnings usually only look at a single function), but you pay for that with unreliability. Also the analysis works on the compiler's IR instead of the C/C++ abstract machine. Best regards, Aaron [1] <https://developers.redhat.com/blog/2019/03/13/understanding-gcc-warnings-part-2/> -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org