Closed Bug 411442 Opened 17 years ago Closed 16 years ago

gcc 4.3 compilation failure on trunk

Categories

(Core :: Networking: Cookies, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 409384

People

(Reporter: caillon, Unassigned)

References

()

Details

Attachments

(1 file)

Note that we have tons of these throughout the tree, naturally.
pretty sure this is the result of a new -Wcoercion option which is enabled by -Wall in 4.3:

http://gcc.gnu.org/wiki/Wcoercion
a quick grep of the log shows 4,091 "may alter its value" warnings, and that's only up to the build failure in netwerk. that, pretty much by definition, makes this useless.
Attached patch turn it offSplinter Review
turns out there is no -Wcoercion, it's just -Wconversion they've changed in gcc 4.3 to make the extra noise.

we could either turn this off just for 4.3+, or turn it off for all gcc's. i took the simpler approach...
Attachment #296922 - Flags: review?(ted.mielczarek)
Comment on attachment 296922 [details] [diff] [review]
turn it off

Forwarding this review to dbaron.  It sounds like this warning is going to become useless for us in gcc4.3, but I don't know if it's benefiting us currently.  Looks like alecf added it originally way back in 1999:
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla&command=DIFF_FRAMESET&file=configure.in&rev2=1.299&rev1=1.298
Attachment #296922 - Flags: review?(ted.mielczarek) → review?(dbaron)
GCC 4.3 will be in tomorrow's rawhide.
Is this also what gives us the signed vs. unsigned comparison warnings?  Or is that something else?  I have to say -- these warnings do seem like potential problems, though.

In prior versions of gcc, what did this option cause warnings about?
And I think if people are using warnings-as-errors, they're signed up to fix all the warnings with any new compiler that comes out, or they get their warnings-as-errors flag turned off.  Compilers come out with new warnings to warn about problems -- that's a good thing, and we should benefit from it, not turn them all off.
Attachment #296922 - Flags: review?(dbaron)
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: