Information specific to C++

The following information applies specifically to C++.

Show/hideC++ calling conventions

ARM C++ uses the same calling conventions as ARM C with one exception:

  • Nonstatic member functions are called with the implicit this parameter as the first argument, or as the second argument if the called function returns a non int-like struct. This might change in future implementations.

Show/hideC++ data types

ARM C++ uses the same data types as ARM C with the following exceptions and additions:

  • C++ objects of type struct or class have the same layout that is expected from ARM C if they have no base classes or virtual functions. If such a struct has neither a user-defined copy assignment operator nor a user-defined destructor, it is a plain old data structure.

  • References are represented as pointers.

  • No distinction is made between pointers to C functions and pointers to C++ nonmember functions.

Show/hideSymbol name mangling

The linker unmangles symbol names in messages.

C names must be declared as extern "C" in C++ programs. This is done already for the ARM ISO C headers.

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0471G