8.2.3.9 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 all compiler warning messages issued into errors. This option might be useful in applications where warnings are not permitted for functional safety reasons.

The --werror=num form of this option promotes only the warning identified by num to an error. See a list of messages and their corresponding number in the Error and Warning Messages section towards the end of this document. If the message indicated by num is not a warning, then this option has no effect. Only one message number may be specified with this option; however, you may use this option as many times as required.

The --wno-error=num form of this option ensures that the warning identified by num is never promoted to an error, even if the --werror form of this option is in effect.