4 ms·
Adding -Werror to your build system sucks because future compilers implement new warnings making it very difficult to recreate new builds with new compilers, fo
by dmm 10y ago
Adding -Werror to your build system sucks because future compilers implement new warnings making it very difficult to recreate new builds with new compilers, for instance when bisecting a bug.
Add it to your local build with "./configure CFLAGS=-Werror" or similar? That's great!
- nomel 10y agoOh, that's interesting. What would be the method for handling this? Branch a known good commit, fix the warning, rebase everything from the future, then bisect?
- astrange 10y agoAlso, no team below you can ever use -Wdeprecated, and no compiler team can ever test your project with a new compiler, because all of it will break your build.
- doubleplaid 10y agoDeprecation annotations are incredibly helpful, many thanks. This is off the top of my head and likely clang specific: -Werror // Treat all warnings as errors -Wno-error=deprecated // Except deprecated warnings -Wno-error=deprecated-implementation // And these ones too The deprecated-implementation warning flag should likely be made part of the deprecated warning group, but it's not yet. See the clang source for a helpful TODO? comment. -Wclang-please-warn-about-warning-groups-that-are-missing-warnings ?