The world of Chromium
The world of Chromium
Posted Mar 17, 2011 10:30 UTC (Thu) by nix (subscriber, #2304)Parent article: The world of Chromium
In practice this means -Werror can only be used safely in released code for projects with enormous testing coverage (the Linux kernel might be able to get away with it if it wanted to), and in GCC bootstraping in stage2 and above, where you really do know what warnings the compiler will emit because you just compiled it.
Using -Werror in any other situation is probably a mistake.
Posted Mar 17, 2011 11:00 UTC (Thu)
by neilbrown (subscriber, #359)
[Link] (4 responses)
My theory is that it increases the likelyhood that any warnings will get reported back to me rather than silently ignored.
and I really do want to know about those warnings, because occasionally they point to real errors.
Posted Mar 17, 2011 13:12 UTC (Thu)
by nix (subscriber, #2304)
[Link]
(Recent GCC versions have moved nearly all such warnings into the front- and early middle-end, where they are not affected by architectural details and are consistent across platforms. #pragma GCC diagnostic may help, as well, but again is only supported on recent GCC versions.)
Posted Mar 17, 2011 23:15 UTC (Thu)
by dirtyepic (guest, #30178)
[Link] (2 responses)
Posted Mar 17, 2011 23:32 UTC (Thu)
by neilbrown (subscriber, #359)
[Link] (1 responses)
Posted Mar 18, 2011 4:55 UTC (Fri)
by dirtyepic (guest, #30178)
[Link]
I'm a Gentoo developer, and as you can imagine the combination of -Werror with a largely uncontrolled build environment (eg. toolchain versions, CFLAGS, etc. are user-managed) makes us a little grumpy.
I can understand your point of view here, but when users can set any -W flag they want then bailing on every warning just isn't possible.
We do log "important" warning messages (ie. those most likely to be an actual problem in practice) and ask the user to report them upstream.
Posted Mar 17, 2011 23:31 UTC (Thu)
by dirtyepic (guest, #30178)
[Link]
The world of Chromium
The world of Chromium
The world of Chromium
You don't need sed, just
The world of Chromium
make CWFLAGS=
(I'm sure you do report warnings when you see them though, don't you?)
The world of Chromium
The world of Chromium