g++ option for showing all warnings except particular one

1.2k views Asked by At

I am using GCC 4.9.2 on Linux.

I would like to enable display all warnings except a few. To enable all warnings, I have used -Wall -Wextra with g++.

But I would like not to have warnings for reorder i.e. I would like to set -Wreorder off.

How could I do it?

2

There are 2 answers

0
Kerrek SB On

Add -Wno-reorder after the other warning flags.

0
Lightness Races in Orbit On

Just read the manual, as you would for any other such question:

Each of these specific warning options also has a negative form beginning -Wno- to turn off warnings; for example, -Wno-implicit.

So, use -Wno-reorder.