3

Using g++ for C++11 code, I was surprised to read that the addition of -Wall and -Wextra did not "cover" every possible warning. Indeed,

Some of [these -Wall warnings] are enabled by -Wextra but many of them must be enabled individually.

Is there a list of the warnings to be enabled individually ?

Haatschii
  • 8,151
  • 10
  • 51
  • 91
suizokukan
  • 1,141
  • 3
  • 14
  • 29
  • 1
    I'm not aware of any list of them but you can compile one yourself with a little bit of work. Look for all `-Wsomething` (except `-Wno-something` of course) options on the linked page that don't exist in the `-Wextra` and `-Wall` lists and doesn't mention being enabled or implied by something else that is included or by default. – eerorika Jun 02 '14 at 16:09
  • 1
    This is a duplicate of the question linked by @omid, even though the title may suggest otherwise. The [accepted answer](https://stackoverflow.com/a/11720263/241631) from JonathanWakely answers this question as well - look through the [options summary](https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Option-Summary.html) for your version of gcc for a list of all warning options. Then look through the [list](https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Warning-Options.html#Warning-Options) enabled by `-Wall` and `-Wextra`. The difference between those sets is the list you're looking for. – Praetorian Jun 02 '14 at 16:13
  • 2
    Apparently, someone has already compiled a list in another duplicate, with a list of options that you may want to leave disabled and why. http://stackoverflow.com/a/9862800/2079303 – eerorika Jun 02 '14 at 16:18
  • thank you for all the details. – suizokukan Jun 04 '14 at 15:30

0 Answers0