1

I know gcc has an option -Werror, which can stop compile if there is an warning, if armcc has similar option, because I want to have a good code quality control in compile level

additional info:

I use armcc 2.2 build 616, I consult ARM, it said --diag_error=warning was add ONLY for armcc 4.0 or later

How Chen
  • 1,340
  • 2
  • 17
  • 37

2 Answers2

0

Try --diag_error=warning.
See http://www.keil.com/support/man/docs/ARMCCREF/armccref_CHDJDADE.htm.

Best,
Tim

Tim Zimmermann
  • 6,132
  • 3
  • 30
  • 36
  • thanks for you info, I add this flag into makefile, but it pop up `"no source": Error: command-line: #613: invalid error tag in diagnostic control option: warning` – How Chen Jan 02 '14 at 10:35
  • 1
    Check your version of armcc: "With build 650 and later of RVCT 4.0, you can also use --diag_error=warning, which will cause all warnings to be upgraded to errors." (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka14423.html). You may have a build < 650. – Tim Zimmermann Jan 02 '14 at 10:51
  • many thanks for you info, I just use `armcc` 2.2, how can I overcome? I also ask ARM, they said this compiler feature was add in `armcc` 4.0 or later – How Chen Jan 03 '14 at 01:27
0

I got answer from ARM, use following

--diag_error=[warning/error_refer_number]

for example:

--diag_error=179,180

Since ARM add --diag_error=warning for armcc 4.0 or later, for old armcc, I ONLY can specify which warning number will STOP the compile process

How Chen
  • 1,340
  • 2
  • 17
  • 37