Keil Logo

Anachronisms in ARM C++

10.8 Anachronisms in ARM C++

You can enable support for anachronisms using the --anachronisms option.

The following anachronisms are accepted:
  • overload is permitted in function declarations. It is accepted and ignored.
  • Definitions are not required for static data members that can be initialized using default initialization. The anachronism does not apply to static data members of template classes, because these must always be defined.
  • The number of elements in an array can be specified in an array delete operation. The value is ignored.
  • You can overload both prefix and postfix operations with a single operator++() and operator--() function.
  • The base class name can be omitted in a base class initializer if there is only one immediate base class.
  • Assignment to the this pointer in constructors and destructors is permitted.
  • A bound function pointer, that is, a pointer to a member function for a given object, can be cast to a pointer to a function.
  • A nested class name can be used as a non-nested class name provided no other class of that name has been declared. The anachronism is not applied to template classes.
  • A reference to a non-const type can be initialized from a value of a different type. A temporary is created, it is initialized from the converted initial value, and the reference is set to the temporary.
  • A reference to a non const class type can be initialized from an rvalue of the class type or a class derived from that class type. No, additional, temporary is used.
  • A function with old-style parameter declarations is permitted and can participate in function overloading as if it were prototyped. Default argument promotion is not applied to parameter types of such functions when the check for compatibility is done, so that the following declares the overloading of two functions named f:
    int f(int);
    int f(x) char x; { return x; }


    In C, this code is legal but has a different meaning. A tentative declaration of f is followed by its definition.
Non-ConfidentialPDF file icon PDF versionARM DUI0375H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.