29.12.2014 Views

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Compiler</strong> Command-line Options<br />

--apcs=/rwpi --no_lower_rwpi --via=L_apcs.txt<br />

and a second via file L_apcs.txt containing the line:<br />

-L--rwpi -L--callgraph<br />

compiling main.c with the command line:<br />

armcc main.c -L-o”main.axf" --via=apcs.txt<br />

compiles main.c using the command line:<br />

armcc --no_lower_rwpi --apcs=/rwpi -L--rwpi -L--callgraph -L-o"main.axf" main.c<br />

See also<br />

• Appendix A Via File Syntax<br />

• Reading compiler options from a file on page 2-10 in the <strong>Compiler</strong> User <strong>Guide</strong>.<br />

2.1.123 --[no_]vla<br />

This option enables or disables support for variable length arrays.<br />

Default<br />

C90 and Standard C++ do not support variable length arrays by default. Select the<br />

option --vla to enable support for variable length arrays in C90 or Standard C++.<br />

Variable length arrays are supported both in Standard C and the GNU compiler<br />

extensions. The option --vla is implicitly selected either when the source language is<br />

C99 or the option --gnu is specified.<br />

Example<br />

size_t arr_size(int n)<br />

{<br />

char array[n];<br />

// variable length array, dynamically allocated<br />

}<br />

return sizeof array;<br />

// evaluated at runtime<br />

See also<br />

• --c90 on page 2-13<br />

• --c99 on page 2-13<br />

• --cpp on page 2-14<br />

• --gnu on page 2-44.<br />

<strong>ARM</strong> DUI 0348A Copyright © 2007, 2010 <strong>ARM</strong> Limited. All rights reserved. 2-93<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!