1 |
Hey all. |
2 |
|
3 |
I'd like to add two warnings to the QA GCC warning message reporter for |
4 |
GCC 4.2. |
5 |
|
6 |
The first is a new warning that is given when GCC makes an optimization |
7 |
assuming that overflow for operations on signed ints is undefined, as |
8 |
per the standard. Apparently a lot of code assumes that it will wrap |
9 |
instead. The reason for this warning is the new -fstrict-overflow flag |
10 |
that is enabled at >= -O2. The warning will only appear with the |
11 |
-Wstrict-overflow flag set, but it is enabled by -Wall so it will be |
12 |
seen pretty often. |
13 |
|
14 |
The other is actually a warning already present in <=4.1. 4.2 now |
15 |
forbids function casts and will actually generate a runtime abort in the |
16 |
code if they're used. This is bad because the code will compile fine |
17 |
but then segfault when executed :(. openssl is a good example (bug |
18 |
#158324). This warning is always reported, even without -Wall. I hope |
19 |
this check will help identify packages that might not be GCC 4.2 ready. |
20 |
|
21 |
|
22 |
-- |
23 |
where to now? if i had to guess |
24 |
dirtyepic gentoo org i'm afraid to say antarctica's next |
25 |
9B81 6C9F E791 83BB 3AB3 5B2D E625 A073 8379 37E8 (0x837937E8) |