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.

C++ Language• When option --nonconst-ref-anachronism is set, a reference to a non-const class can be bound to aclass rvalue of the same type or a derived type thereof.struct A {A(int);A operator=(A&);A operator+(const A&);};main () {A b(1);b = A(1) + A(2); // Allowed as anachronism}2.2.4. Extensions Accepted in Normal C++ ModeThe following extensions are accepted in all modes (except when strict ANSI/ISO violations are diagnosedas errors or were explicitly noted):• A friend declaration <strong>for</strong> a class may omit the class keyword:class A {friend B; // Should be "friend class B"};• Constants of scalar type may be defined within classes:class A {const int size = 10;int a[size];};• In the declaration of a class member, a qualified name may be used:struct A {int A::f(); // Should be int f();};• The restrict keyword is allowed.• A const qualified object with file scope or namespace scope and the __at() attribute will have externallinkage, unless explicitly declared static. Examples:const int i = 5;// internal linkageconst int j __at( 0x1234 ) = 10;// external linkagestatic const int k __at( 0x1236 ) = 15; // internal linkageNote that no warning is generated when 'j' is not used.45

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

Saved successfully!

Ooh no, something went wrong!