12.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS
  • No tags were found...

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

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

C++ Language• The address of a statement label can be taken by use of the prefix "&&" operator, e.g., void *a =&&L. A transfer to the address of a label can be done by the "goto *" statement, e.g., goto *a.• Multi-line strings are supported, e.g.,char *p = "abcdef";• ASCII "NULL" characters are accepted in source files.• A source file can end with a backslash ("\") character.• Case ranges (e.g., "case 'a' ... 'z':") are supported.• A number of macros are predefined in GNU mode. See Section 2.9, Predefined Macros.• A predefined macro can be undefined.• A large number of special functions of the <strong>for</strong>m __builtin_xyz (e.g., __builtin_alloca) arepredeclared.• Some expressions are considered to be constant-expressions even though they are not so consideredin standard C and C++. Examples include "((char *)&((struct S *)0)->c[0]) - (char*)0" and "(int)"Hello" & 0".• The macro __GNUC__ is predefined to the major version number of the emulated GNU compiler.Similarly, the macros __GNUC_MINOR__ and __GNUC_PATCHLEVEL__ are predefined to thecorresponding minor version number and patch level. Finally, __VERSION__ is predefined to a stringdescribing the compiler version.• The __thread specifier can be used to indicate that a variable should be placed in thread-local storage(requires gnu_version >= 30400).• An extern inline function that is referenced but not defined is permitted (with a warning).• Trigraphs are ignored (with a warning).• Non-standard casts are allowed in null pointer constants, e.g., (int)(int *)0 is considered a nullpointer constant in spite of the pointer cast in the middle.• Statement expressions, e.g., ({int j; j = f(); j;)} are accepted. Branches into a statementexpression are not allowed. In C++ mode, branches out are also not allowed. Variable-length arrays,destructible entities, try, catch, local non-POD class definitions, and dynamically-initialized local staticvariables are not allowed inside a statement expression.• Labels can be declared to be local in statement expressions by introducing them with a __label__declaration.({ __label__ lab; int i = 4; lab: i = 2*i-1; if (!(i%17)) goto lab; i; })• Not-evaluated parts of constant expressions can contain non-constant terms:43

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

Saved successfully!

Ooh no, something went wrong!