Standard C++ library implementation definition
The Standard C++ library in ARM® Compiler 6 is based on the LLVM libc++ project.
NoteThis topic includes descriptions of [ALPHA] and [BETA] features. See Support level definitions.
The following sections describe the limitations of the Standard C++ library in ARM Compiler 6.
Support for C++11
ARM Compiler 6 C++ libraries support the majority of C++11. The major limitation is that Thread support (<thread>) is not available.
Support for exceptions
ARM Compiler 6 supports:
- C++ libraries with exceptions.
- [BETA] C++ libraries without exceptions
as a [BETA] feature. These libraries are compiled with the
Linking objects that have been compiled with
-fno-exceptions automatically selects the libraries without exceptions. You can
use the linker option
--no_exceptions to diagnose whether
the objects being linked contain exceptions.
By default, C++ sources are compiled with exceptions support. You can use the
-fno-exceptionsoption to disable exceptions support.
By default, C sources are compiled without exceptions support. You can use the
-fexceptionsoption to enable exceptions support.
If an exception propagates into a function that has been compiled without exceptions support, then the program terminates.
If the C++ libraries built without exception support is put in an error state, then an exception is not thrown, but the program behavior is undefined.
Support for Array Construction and Delete helper functions
ARM Compiler 6 is not compatible with C++ objects from other compilers that use Array Construction and Delete helper functions.
Support for Atomic
[ALPHA] ARM Compiler 6 provides access to the Atomic operations library <atomic> as an [ALPHA] feature.
NoteARM Compiler 6 does not provide an implementation of
libatomic. You must either provide an implementation of
libatomicor only use the atomic operation library for types for which the hardware can provide synchronization primitives.
Support for multithreading
ARM Compiler 6 does not support multithreading for libc++. The ARM Compiler C++ libraries have not been built with multithreading support. Thread support (<thread>) is not available.
Support for thread-safe static initialization of local variables in C++
The ARM Compiler 6 C++ libraries contain trivial implementations of the following one-time construction API functions, which are not thread-safe:
extern “C” int
extern “C” void __cxa_guard_release(int
extern “C” void __cxa_guard_abort(int
NoteFor thread-safe static initialization of local variables in C++, you must provide your own thread-safe implementation of these functions.
These API functions are described in more detail in the Run-time ABI for the ARM Architecture. On ARMv6-M, you must also provide thread-safe atomic helper functions.
Support for ARMv6-M atomic helper functions
The ARM Compiler 6 ARMv6-M libraries contain trivial implementations of the following atomic helper functions, which are not thread-safe:
uint32_t __user_cmpxchg_4(uint32_t *ptr, uint32_t
old, uint32_t new);
uint16_t __user_cmpxchg_2(uint16_t *ptr, uint16_t
old, uint16_t new);
uint8_t __user_cmpxchg_1(uint8_t *ptr, uint8_t
old, uint8_t new);
uint64_t __atomic_exchange_8(uint64_t *dest,
uint64_t val, int model);
uint32_t __atomic_exchange_4(uint32_t *dest,
uint32_t val, int model);
uint16_t __atomic_exchange_2(uint16_t *dest,
uint16_t val, int model);
uint8_t __atomic_exchange_1(uint8_t *dest,
uint8_t val, int model);