3.6.4.4 W: Enable or Disable Message Option

The -Wmsg option enables warning and advisory messages. The msg argument can be the name of a message issued by the compiler (e.g. no-implicit-int). The special message argument all indicates that all messages should be enabled. This option has precedence over the -w option, which disables all warning messages, so it can be used to re-enable selected messages when -w has been used.

The -Wno-msg form of the option disables the indicated message, using the same arguments as the enabling form of this option. Where the msg argument corresponds to a warning or advisory message, this message will never be issued by the compiler or assembler. If the argument corresponds to an error or is not recognized, the compiler will indicate via an error that this operation is not permitted.

The name of the message is printed in compiler warnings (as shown in the following example of a return-type warning).
main.c:12:1: warning: control reaches end of non-void function [-Wreturn-type]