https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89072

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org

--- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> ---
-Werror should *never* be the default.  Warnings are warnings, and errors
are errors.  Warnings are for situations where the compiler cannot tell
whether what you did is wrong, and errors are for when it *can* tell
unambiguously that your program is incorrect.

Many warnings are *wrong*.  That is in the nature of warnings.  Refusing
to build a correct program is a disservice.

Warnings change frequently, with every release of GCC.  On the other hand,
errors do not change (ignoring compiler bugs): incorrect programs stay
incorrect, and if we failed to diagnose an incorrect program before, that
does not change the fact that it was incorrect.


Making -Wall the default will potentially break the build of very many
projects, *especially* those that misguidedly use -Werror.  I don't see
any less painful path to enabling -Wall by default.  I don't really see
the point: there are other gcc command line mistakes that are made more
often, certainly by beginners (like forgetting -Wextra, or putting -l's
before the object files, or or or).

Beginners are better off not invoking the compiler driver directly.

Reply via email to