Hey all.
I'd like to add two warnings to the QA GCC warning message reporter for
GCC 4.2.
The first is a new warning that is given when GCC makes an optimization
assuming that overflow for operations on signed ints is undefined, as
per the standard. Apparently a lot of code assumes that it will wrap
instead. The reason for this warning is the new -fstrict-overflow flag
that is enabled at >= -O2. The warning will only appear with the
-Wstrict-overflow flag set, but it is enabled by -Wall so it will be
seen pretty often.
The other is actually a warning already present in <=4.1. 4.2 now
forbids function casts and will actually generate a runtime abort in the
code if they're used. This is bad because the code will compile fine
but then segfault when executed :(. openssl is a good example (bug
#158324). This warning is always reported, even without -Wall. I hope
this check will help identify packages that might not be GCC 4.2 ready.
--
where to now? if i had to guess
dirtyepic gentoo org i'm afraid to say antarctica's next
9B81 6C9F E791 83BB 3AB3 5B2D E625 A073 8379 37E8 (0x837937E8)
--- /usr/lib/portage/bin/misc-functions.sh 2007-03-18 22:54:15.000000000 -0600
+++ misc-functions.sh 2007-03-18 22:57:08.000000000 -0600
@@ -297,6 +297,8 @@
": warning: is used uninitialized in this function$" # we'll ignore "may" and "might"
": warning: comparisons like X<=Y<=Z do not have their mathematical meaning$"
": warning: null argument where non-null required "
+ ": warning: assuming signed overflow does not occur"
+ ": warning: function called through a non-compatible type"
)
abort="no"
i=0