| |||
| Home > Mixing C, C++, and Assembly Language > Calling between C, C++, and ARM assembly language > Information specific to C++ | |||
The following information applies specifically to C++.
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.
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.
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.