1 |
Ryan Hill wrote: |
2 |
> Hey all. |
3 |
> |
4 |
> I'd like to add two warnings to the QA GCC warning message reporter for |
5 |
> GCC 4.2. |
6 |
> |
7 |
> The first is a new warning that is given when GCC makes an optimization |
8 |
> assuming that overflow for operations on signed ints is undefined, as |
9 |
> per the standard. Apparently a lot of code assumes that it will wrap |
10 |
> instead. The reason for this warning is the new -fstrict-overflow flag |
11 |
> that is enabled at >= -O2. The warning will only appear with the |
12 |
> -Wstrict-overflow flag set, but it is enabled by -Wall so it will be |
13 |
> seen pretty often. |
14 |
> |
15 |
> The other is actually a warning already present in <=4.1. 4.2 now |
16 |
> forbids function casts and will actually generate a runtime abort in the |
17 |
> code if they're used. This is bad because the code will compile fine |
18 |
> but then segfault when executed :(. openssl is a good example (bug |
19 |
> #158324). This warning is always reported, even without -Wall. I hope |
20 |
> this check will help identify packages that might not be GCC 4.2 ready. |
21 |
|
22 |
|
23 |
If you expect these warnings to be *fixed* by developers please provide |
24 |
documentation to enable developers to do so. SpanKY has some docs in |
25 |
trunk/doc/ for this express purpose. As much as I love QA checks I |
26 |
really don't like forcing them on people (doubly so for a failure mode |
27 |
check like this) without giving people advice on how to fix them. |
28 |
|
29 |
Thanks, |
30 |
|
31 |
-Alec |
32 |
-- |
33 |
gentoo-portage-dev@g.o mailing list |