3.6.4.7 Werror Option
The -Werror
option can be used to promote compiler warnings into errors.
As with any other error, these promoted messages will prevent the application from
completing.
The -Werror
form of this option promotes any compiler warning message
issued into an error. This option might be useful in applications where warnings are not
permitted for functional safety reasons.
The -Werror=string
form of this option promotes
warnings identified by the string into errors. For example,
-Werror=return-type
will promote the warning control
reaches end of non-void function [-Wreturn-type]
to an error. Only one
string may be specified with this option; however, you may use this option as many times
as required.
The -Wno-error=string
form of this option ensure that
the warnings identified are never promoted to an error, even if the
-Werror
form of this option is in effect.