3 ms·
This is better understood when writing websites. A website shouldn’t be tied to a particular browser vendor or a particular browser version. Browsers don’t have
by skybrian 3y ago
This is better understood when writing websites. A website shouldn’t be tied to a particular browser vendor or a particular browser version. Browsers don’t have any mechanism similar to -Werror because it would be a “break if the user upgrades their browser” flag. (There is “use strict” but it doesn’t become stricter with browser upgrades.)
Similarly, let’s say we’re talking about an open source project that users may download and compile from source. A portable open source project shouldn’t needlessly break if you use a newer or different compiler.
So:
- Do make the source code as clean as you can, using all tools available, including -Werror. Putting -Werror in your continuous build should be fine too.
- When a user downloads your library and compiles it in order to use it, the make target (or equivalent) that they use shouldn’t compile with -Werror, because we don’t know which compiler they have or which warnings that enables.