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.

Language Extensions<br />

static int y = c + 10; /* error ext */<br />

static int const z = c + 10; /* error ext */<br />

extern int *const cp = (int*)0x100; /* ok ok */<br />

extern int *const xp = cp + 0x100; /* error ext */<br />

static int * yp = cp + 0x100; /* error ext */<br />

static int *const zp = cp + 0x100; /* error ext */<br />

This indicates the behavior defined by the ISO C Standard, Std, and the behavior in<br />

RVCT:<br />

• ok indicates that the statement is accepted in all C modes.<br />

• ext is an extension to the ISO C Standard. The behavior depends on the strict<br />

mode used when compiling C:<br />

Non strict<br />

Accepted, without a warning.<br />

--strict_warnings<br />

Accepted, but gives a warning.<br />

--strict<br />

Conforms to the ISO C Standard, but gives an error.<br />

See also<br />

• --extended_initializers, --no_extended_initializers on page 2-56<br />

• --strict, --no_strict on page 2-119<br />

• --strict_warnings on page 2-120.<br />

3.4.2 Array and pointer extensions<br />

The following array and pointer extensions are supported:<br />

• Assignment and pointer differences are permitted between pointers to types that<br />

are interchangeable but not identical, for example, unsigned char * and char *.<br />

This includes pointers to same-sized integral types, typically, int * and long *. A<br />

warning is issued.<br />

Assignment of a string constant to a pointer to any kind of character is permitted<br />

without a warning.<br />

• Assignment of pointer types is permitted in cases where the destination type has<br />

added type qualifiers that are not at the top level, for example, assigning int ** to<br />

const int **. Comparisons and pointer difference of such pairs of pointer types<br />

are also permitted. A warning is issued.<br />

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

ID101213<br />

Non-Confidential,

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

Saved successfully!

Ooh no, something went wrong!