SPRUI04F july 2015 – april 2023
The C6000 C/C++ compiler extends the C/C++ language with the __near and __far keywords to specify how global and static variables are accessed and how functions are called.
Syntactically, the __near and __far keywords are treated as storage class specifiers. One can appear before, after, or in between the storage class specifiers and types. Normally only one storage class specifier is permitted in a variable declaration. However, two storage class specifiers can be used in a single declaration if one of the two is __near or __far.
The following examples are legal combinations of __near and __far with other storage class specifiers:
__far static int x;
static __near int x;
static int __far x;
__far int foo();
static __far int foo();