13.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

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

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

<strong>TASKING</strong> <strong>VX</strong>-<strong>toolset</strong> <strong>for</strong> <strong>ARM</strong> <strong>User</strong> <strong>Guide</strong>• Implicit type conversion between a pointer to an extern "C" function and a pointer to an extern"C++" function is permitted. Here's an example:extern "C" void f(); // f's type has extern "C" linkagevoid (*pf)() // pf points to an extern "C++" function= &f; // error unless implicit conversion is// allowedThis extension is allowed in environments where C and C++ functions share the same callingconventions. It is enabled by default.• A "?" operator whose second and third operands are string literals or wide string literals can be implicitlyconverted to "char *" or "wchar_t *". (Recall that in C++ string literals are const. There is adeprecated implicit conversion that allows conversion of a string literal to "char *", dropping the const.That conversion, however, applies only to simple string literals. Allowing it <strong>for</strong> the result of a "?" operationis an extension.)char *p = x ? "abc" : "def";• Default arguments may be specified <strong>for</strong> function parameters other than those of a top-level functiondeclaration (e.g., they are accepted on typedef declarations and on pointer-to-function andpointer-to-member-function declarations).• Non-static local variables of an enclosing function can be referenced in a non-evaluated expression(e.g., a sizeof expression) inside a local class. A warning is issued.• In default C++ mode, the friend class syntax is extended to allow nonclass types as well as class typesexpressed through a typedef or without an elaborated type name. For example:typedef struct S ST;class C {friend S; // OK (requires S to be in scope).friend ST; // OK (same as "friend S;").friend int; // OK (no effect).friend S const; // Error: cv-qualifiers cannot// appear directly.};• In default C++ mode, mixed string literal concatenations are accepted. (This is a feature carried overfrom C99 and also available in GNU modes).wchar_t *str = "a" L"b"; // OK, same as L"ab".• In default C++ mode, variadic macros are accepted. (This is a feature carried over from C99 and alsoavailable in GNU modes.)• In default C++ mode, empty macro arguments are accepted (a feature carried over from C99).• A trailing comma in the definition of an enumeration type is silently accepted (a feature carried overfrom C99):46

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

Saved successfully!

Ooh no, something went wrong!