Use the -w or -Wn option to suppress warning messages or to enable remarks during the preprocessing and compilation phases. You can enter the option with one of the following arguments:
Option | Description |
---|---|
-w0,-w | Displays error messages only. Both -w0 and -w display exactly the same messages. |
-w1,-w2 | Displays warnings and error messages. Both -w1 and -w2 display exactly the same messages.The compiler uses this level as the default. |
For some compilations, you might not want warnings for known and benign characteristics, such as the K&R C constructs in your code. For example, the following command compiles newprog.c and displays compiler errors, but not warnings: