You copied the Doc URL to your clipboard.

Standard C++ library implementation definition

The Standard C++ library in Arm® Compiler 6 is based on the LLVM libc++ project.

Note

This 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 -fno-exceptions option.

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.

Note

  • By default, C++ sources are compiled with exceptions support. You can use the -fno-exceptions option to disable exceptions support.

  • By default, C sources are compiled without exceptions support. You can use the -fexceptions option 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.

Note

Arm Compiler 6 does not provide an implementation of libatomic. You must either provide an implementation of libatomic or 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 <thread> and <mutex>. A multi-threaded [ALPHA]-supported variant of the C++ library is also included in Arm Compiler 6. For more information on using this library, contact the Arm Support team.

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 __cxa_guard_acquire(int*guard_object);

extern “C” void __cxa_guard_release(int *guard_object);

extern “C” void __cxa_guard_abort(int *guard_object);

Note

  • This does not apply to the [ALPHA]-supported multi-threaded 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);

Note

For atomic access on the Armv6‑M architecture, you must provide your own thread-safe implementation of the atomic helper functions.
Was this page helpful? Yes No