This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to make ARM compiler report compilation warnings, as error?

Note: This was originally posted on 24th November 2008 at http://forums.arm.com

I want the compiler to report all compilation warnings as errors, in ARM C Compiler. Didn't get any help from the Specs. Has anyone tried this? How can I do it?
Parents
  • Note: This was originally posted on 25th November 2008 at http://forums.arm.com

    You can do it for individual messages using the [url="http://infocenter.arm.com/help/topic/com.arm.doc.dui0348b/CHDJDADE.html"]--diag_error[/url] switch. However, the GNU-style "-Wall" and "-Werror" switches do not work with the ARM compiler so you're out of luck there. I don't know of another way to achieve this using command-line switches.

    One option is to parse the output using your build system. A simple script could be written to check for warning messages and return an error condition if any are found.

    Please post on here if you find a good solution to this, as I (and probably others) would be interested to see how this can be achieved.

    Thanks,
    Jacob
Reply
  • Note: This was originally posted on 25th November 2008 at http://forums.arm.com

    You can do it for individual messages using the [url="http://infocenter.arm.com/help/topic/com.arm.doc.dui0348b/CHDJDADE.html"]--diag_error[/url] switch. However, the GNU-style "-Wall" and "-Werror" switches do not work with the ARM compiler so you're out of luck there. I don't know of another way to achieve this using command-line switches.

    One option is to parse the output using your build system. A simple script could be written to check for warning messages and return an error condition if any are found.

    Please post on here if you find a good solution to this, as I (and probably others) would be interested to see how this can be achieved.

    Thanks,
    Jacob
Children
No data