Turn on C99 VLAs in IAR

IAR defaults to C99 mode, but doesn't enable VLAs by default. Enable them
to make it more conformant.

We don't have much if any code using actual variable-length arrays, but
variably-modified types are occasionally used. The same switch controls
both.

(VLAs were actually already enabled in most of the project export
templates, but not the build script).
pull/1985/head
Kevin Bracey 2016-06-22 12:23:17 +03:00
parent b4bb088876
commit 80a03e1787
2 changed files with 2 additions and 2 deletions

View File

@ -402,7 +402,7 @@
</option>
<option>
<name>IccAllowVLA</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>IccCppDialect</name>

View File

@ -40,7 +40,7 @@ class IAR(mbedToolchain):
"-e", # Enable IAR language extension
"--diag_suppress=Pa050,Pa084,Pa093,Pa082"],
'asm': [],
'c': [],
'c': ["--vla"],
'cxx': ["--guard_calls"],
'ld': ["--skip_dynamic_initialization", "--threaded_lib"],
}