On Thu, Jun 20, 2019 at 05:24:15PM -0400, Matthew Beliveau wrote: > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2019-06-20 Matthew Beliveau <mbeli...@redhat.com> > > PR c++/90875 - added -Wswitch-outside-range option > * doc/invoke.texi (Wswitch-outside-range): Document. > > * c-warn.c (c_do_switch_warnings): Implemented new Wswitch-outside-range > warning option.
Here you can just say "Use OPT_Wswitch_outside_range." > * c.opt (Wswitch-outside-range): Added new option. > * c-c++-common/Wswitch-outside-range-1.c: New test. > * c-c++-common/Wswitch-outside-range-2.c: New test. > * c-c++-common/Wswitch-outside-range-3.c: New test. > * c-c++-common/Wswitch-outside-range-4.c: New test. Note that the c.opt entry will go to c-family/ChangeLog while the tests will go to testsuite/ChangeLog. > +@item -Wswitch-outside-range > +@opindex Wswitch-outside-range > +@opindex Wno-switch-outside-range > +Warn whenever a @code{switch} state has a value that is outside of its > +respective type range. This warning is enabled by default for > +C and C++ progarams. > + Note that the typos you had fixed crept back. OK with those fixed. Be careful where you put the ChangeLog entries. Marek