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. Thread support,
<thread>, as well as other concurrency features,
are [ALPHA] supported.
Support for C++14 [BETA]
C++14 is [BETA] supported in Arm Compiler 6. Thread support, <thread>, as well as other concurrency features, are [ALPHA] supported.
Support for exceptions
Arm Compiler 6 supports:
- C++ libraries with exceptions.
- C++ libraries without exceptions. 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
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 [ALPHA]
The default standard C++ library
shipped in Arm Compiler 6 does not
support multithreading. This variant of the standard C++ library does not support the
concurrency constructs available through the headers, that includes
multithreaded [ALPHA]-supported variant of the C++ library is also included in Arm Compiler 6.
Support for thread-safe static initialization of local variables in C++
The default C++ library in Arm Compiler 6 contains 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
- This does not apply to the [ALPHA]-supported multithreaded C++ libraries. Contact the Arm Support team for more information.
- For 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 the Armv6‑M architecture, you must also provide thread-safe atomic helper functions.
Support for Arm®v6‑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);