Skip to content

Commit 667d49e

Browse files
authored
Merge pull request #1985 from kjbracey-arm/iar_vlas
Turn on C99 VLAs in IAR
2 parents 6dd11c7 + b74546c commit 667d49e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

tools/export/iar_template.ewp.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@
402402
</option>
403403
<option>
404404
<name>IccAllowVLA</name>
405-
<state>0</state>
405+
<state>1</state>
406406
</option>
407407
<option>
408408
<name>IccCppDialect</name>

tools/toolchains/arm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ARM(mbedToolchain):
3838
"--brief_diagnostics", "--restrict", "--multibyte_chars", "-I \""+ARM_INC+"\""],
3939
'asm': [],
4040
'c': ["--md", "--no_depend_system_headers", "--c99", "-D__ASSERT_MSG"],
41-
'cxx': ["--cpp", "--no_rtti"],
41+
'cxx': ["--cpp", "--no_rtti", "--no_vla"],
4242
'ld': [],
4343
}
4444

tools/toolchains/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class GCC(mbedToolchain):
3838
],
3939
'asm': ["-x", "assembler-with-cpp"],
4040
'c': ["-std=gnu99"],
41-
'cxx': ["-std=gnu++98", "-fno-rtti"],
41+
'cxx': ["-std=gnu++98", "-fno-rtti", "-Wvla"],
4242
'ld': ["-Wl,--gc-sections", "-Wl,--wrap,main",
4343
"-Wl,--wrap,_malloc_r", "-Wl,--wrap,_free_r", "-Wl,--wrap,_realloc_r"],
4444
}

tools/toolchains/iar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class IAR(mbedToolchain):
4040
"-e", # Enable IAR language extension
4141
"--diag_suppress=Pa050,Pa084,Pa093,Pa082"],
4242
'asm': [],
43-
'c': [],
43+
'c': ["--vla"],
4444
'cxx': ["--guard_calls"],
4545
'ld': ["--skip_dynamic_initialization", "--threaded_lib"],
4646
}

0 commit comments

Comments
 (0)