3 ms·
There is some discussion there about whether it's a good idea to enable -Werror: make all warnings errors (which breaks builds for users that use a newer compil
by kazinator 3y ago
There is some discussion there about whether it's a good idea to enable -Werror: make all warnings errors (which breaks builds for users that use a newer compiler that introduces new warnings) Someone said, how about doing that for version control checkouts. But downstream users use version control checkouts too.
I have a solution for that kind of thing: ./configure --maintainer.
If the building user identifies as a maintainer, then some things can happen differently. Stricter compiler options may be one. Another thing you might do in maintainer mode is update generated files (e.g. Yacc parsers) rather than using the canned, shipped code.
In TXR's ./configure, maintainer mode enables parallel make, which is suppressed otherwise. There is a way to enable it without requesting maintainer mode. Parallel make asks for problems because it can introduce race conditions into build steps, causing builds to intermittently fail. So in keeping with the theme of not breaking users, we disable it --- unless they announce themselves to be developing users via maintainer mode.
- quelsolaar 3y agoA few things to note and out this. Yes feel free to enable -Werror, but warnings are implementation specific, so there is no way to write portable C code that is warning free. A compiler can issue a warning for anything, like you using a computer, or you should mind you knees when walking stairs. There is a worrying trend about -Werror, and that is that people turn it on and then when compilers add new warnings, builds fail and developers complain to the compiler developers. This is BAD. we should encourage compiler developers to find as many warnings as possible, and then users should turn off the once they don't like. Juste because a warning is stupid to you doesn't mean that it wont catch a bug for someone else. Compiler developers are responsible for correctly compiling your code, not to keep your code warning free. I have spoken to several compiler developer who don't want to add new valid warnings because of the vitriol they will receive from developers.
- EPWN3D 3y agoIntroduce an error epoch and let maintainers advance it at whatever pace they'd like. You could even select a more recent epoch for your local builds and keep your CI builds on an earlier epoch until you've qualified against the most recent one.
- kazinator 3y ago> people turn it on and then when compilers add new warnings, builds fail and developers complain to the compiler developers. That's a strange reply to a comment which specifically acknowledges the issue and describes one solution.