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.

Language Extensions<br />

3.4.7 External entities<br />

External entities declared in other scopes are visible.<br />

Errors<br />

The compiler generates a warning if an external entity declared in another scope is<br />

visible.<br />

Example<br />

void f1(void)<br />

{<br />

extern void f();<br />

}<br />

void f2(void)<br />

{<br />

f(); /* Out of scope declaration */<br />

}<br />

3.4.8 Function prototypes<br />

The compiler recognizes function prototypes that override old-style non prototype<br />

definitions that appear at a later position in your code, for example:<br />

Errors<br />

The compiler generates a warning message if you use old-style function prototypes.<br />

Example<br />

int function_prototypes(char);<br />

// Old-style function definition.<br />

int function_prototypes(x)<br />

char x;<br />

{<br />

return x == 0;<br />

}<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!