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 />

2.1.2 --[no_]alternative_tokens<br />

This option enables or disables the recognition of alternative tokens in C and C++.<br />

Default<br />

The default is --alternative_tokens.<br />

Usage<br />

In C and C++, use this option to control recognition of the digraphs. In C++, use this<br />

option to control recognition of operator keywords, for example, and and bitand.<br />

2.1.3 --[no_]anachronisms<br />

This option enables or disables anachronisms in C++.<br />

Mode<br />

This option is effective only if the source language is C++.<br />

Default<br />

The default is --no_anachronisms.<br />

Example<br />

typedef enum { red, white, blue } tricolor;<br />

inline tricolor operator++(tricolor c, int)<br />

{<br />

int i = static_cast(c) + 1;<br />

return static_cast(i);<br />

}<br />

void foo(void)<br />

{<br />

tricolor c = red;<br />

}<br />

c++; // okay<br />

++c; // anachronism<br />

Compiling this code with the option --anachronisms generates a warning message.<br />

Compiling this code without the option --anachronisms generates an error message.<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!