04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Compiler Command-line Options<br />

Restrictions<br />

The compiler defines and undefines macros in the following order:<br />

1. compiler predefined macros<br />

2. macros defined explicitly, using -Dname<br />

3. macros explicitly undefined, using -Uname.<br />

Example<br />

Specifying the option:<br />

-DMAX(X,Y)="((X > Y) X : Y)"<br />

on the command line is equivalent to defining the macro:<br />

#define MAX(X, Y) ((X > Y) X : Y)<br />

at the head of each source file.<br />

See also<br />

• -C on page 2-22<br />

• -E on page 2-52<br />

• -Uname on page 2-127<br />

• Compiler predefines on page 4-198.<br />

2.1.36 --data_reorder, --no_data_reorder<br />

This option enables or disables automatic reordering of top-level data items, for<br />

example global variables.<br />

The compiler can save memory by eliminating wasted space between data items.<br />

However, --data_reorder can break legacy code, if the code makes invalid assumptions<br />

about ordering of data by the compiler.<br />

The ISO C Standard does not guarantee data order, so you must avoid writing code that<br />

depends on any assumed ordering. If you require data ordering, place the data items into<br />

a structure.<br />

Default<br />

The default is --data_reorder.<br />

2-36 Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. <strong>ARM</strong> DUI 0348C<br />

Non-Confidential,<br />

ID101213

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

Saved successfully!

Ooh no, something went wrong!