Datasheet

ARM Compiler Reference
3-20 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
Example 3-6 Linkage specification
extern const int z; /* in read-only segment, cannot */
/* be dynamically initialized */
extern "C++:read/write" const int y; /* in read/write segment */
/* can be dynamically initialized */
extern "C++:read/write" {
const int i=5; /* placed in read-only segment, */
/* not extern because implicitly static */
extern const T x=6; /* placed in read/write segment */
struct S {
static const T T x; /* placed in read/write segment */
};
}
Constant objects must not be redeclared with another linkage. The code in Example 3-7
produces a compile error.
Example 3-7 Compiler error
extern "C++" const T x;
extern "C++:read/write" const T x; /* error */
Note
Because C does not have the linkage specifications, you cannot use a
const
object
declared in C++ as
extern "C++:read/write"
from C.