5.4.2. Information specific to C++

The following information applies specifically to C++.

C++ 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.

C++ 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.

Symbol 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. See Using C header files from C++ for more information.

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0203G
Non-Confidential