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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |easyhack

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
It doesn't make sense to really enable every -Wx option, some of them are too
specialized (-Wdouble-promotion, -Wtraditional, -Wlarger-than=, -Wc++-compat,
etc.)

However, if someone goes through the trouble of compiling a list of potential
candidates, it should be trivial to implement using EnabledBy() in common.opt,
c.opt, etc.

Now I think the original proposal of having warnings levels is not what GCC
wants. In fact, we now have -Ofast, -Os, and -Og and the consensus seems to be
that we do not want to have -O4. According to
https://gcc.gnu.org/wiki/DiagnosticsGuidelines

<quote>
* enabled by default if it has (almost) no false positives (e.g., -Woverflow);

* added to -Wall if it is generally useful with low number of false positives
that are easy to work-around;

* added to -Wextra if it has quite a lot of false positives but they are still
easy to work-around; 

Warning options should move up in this list when bugfixes reduce the number of
false positives. These cases are not meant to be exhaustive: some options
should never be enabled by other option if the warning is too specific
(-Wdouble-promotion); other options are already controlled by options such as
-Wpedantic and -Wformat and do not need to move up in this list (but they might
if deemed useful).
</quote>

We could add:

* always added to -Weverything unless the warning was never meant to be
generally useful even if it were perfect (-Wdouble-promotion, -Wtraditional,
-Wlarger-than=, -Wc++-compat, etc.).

Reply via email to