Access to C and C++ compile-time constant
expressions from embedded assembler
You can use the __cpp keyword to access C and
C++ compile-time constant expressions, including the addresses of
data or functions with external linkage, from the assembly code.
The expression inside the __cpp must be a constant
expression suitable for use as a C++ static initialization. See 3.6.2
Initialization of non-local objects and 5.19
Constant expressions in ISO/IEC 14882:2003.
Example 22 shows a
constant replacing the use of __cpp(expr):
Names in the __cpp expression are looked
up in the C++ context of the __asm function.
Any names in the result of a __cpp expression
are mangled as required and automatically have IMPORT statements
generated for them.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.