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

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

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

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

Example<br />

void foo(void)<br />

{<br />

long long i; /* okay in non-strict C90 */<br />

}<br />

Compiling this code with --strict generates an error.<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 />

• --strict_warnings<br />

• Source language modes on page 1-3 in the <strong>Compiler</strong> User <strong>Guide</strong>.<br />

2.1.113 --strict_warnings<br />

This option enforces strict C or strict C++, depending on the choice of source language<br />

used.<br />

The --strict_warnings option behaves similarly to --strict, except that the compiler<br />

issues warning messages in place of error messages when nonstandard features are<br />

used.<br />

Errors<br />

When --strict_warnings is in force and a violation of the relevant ISO standard occurs,<br />

the compiler normally issues a warning message.<br />

The severity of diagnostic messages can be controlled in the usual way.<br />

Note<br />

In some cases, the compiler issues an error message instead of a warning when it detects<br />

something that is strictly illegal, and terminates the compilation. For example:<br />

#ifdef $Super$<br />

extern void $Super$$__aeabi_idiv0(void); /* intercept __aeabi_idiv0 */<br />

#endif<br />

Compiling this code with --strict_warnings generates an error.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!