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++ Language2.3. GNU ExtensionsThe C++ compiler can be configured to support the GNU C++ mode (command line option --g++). In thismode, many extensions provided by the GNU C++ compiler are accepted. The following extensions areprovided in GNU C++ mode.• Extended designators are accepted• Compound literals are accepted.• Non-standard anonymous unions are accepted• The typeof operator is supported. This operator can take an expression or a type (like the sizeofoperator, but parentheses are always required) and expands to the type of the given entity. It can beused wherever a typedef name is allowedtypeof(2*2.3) d; // Declares a "double"typeof(int) i; // Declares an "int"This can be useful in macro and template definitions.• The __extension__ keyword is accepted preceding declarations and certain expressions. It has noeffect on the meaning of a program.__extension__ __inline__ int f(int a) {return a > 0 ? a/2 : f(__extension__ 1-a);}• In all GNU C modes and in GNU C++ modes with gnu_version < 30400, the type modifiers signed,unsigned, long and short can be used with typedef types if the specifier is valid with the underlyingtype of the typedef in ANSI C. E.g.:typedef int I;unsigned I *pui; // OK in GNU C++ mode;// same as "unsigned int *pui"• If the command line option --long-long is specified, the extensions <strong>for</strong> the long long and unsignedlong long types are enabled.• Zero-length array types (specified by [0]) are supported. These are complete types of size zero.• C99-style flexible array members are accepted. In addition, the last field of a class type have a classtype whose last field is a flexible array member. In GNU C++ mode, flexible array members are treatedexactly like zero-length arrays, and can there<strong>for</strong>e appear anywhere in the class type.• The C99 _Pragma operator is supported.• The gcc built-in and facilities (__builtin_va_list, __builtin_va_arg, ...) areaccepted.• The sizeof operator is applicable to void and to function types and evaluates to the value one.41

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

Saved successfully!

Ooh no, something went wrong!